CommandCodeAI / CommandCodeAI/command-code

[Bug] C-x C-g to launch editor triggers visual artifacts

Open
#494 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

Summary

The Ctrl-x Ctrl-g shortcut, which launches the $EDITOR from the terminal, fails to register typed characters properly, it feels laggy and after pressing Enter multiple times or typing a colon (:), the terminal fills with colored lines and other visual artifacts. This disrupts the session and often requires multiple Ctrl-c keystrokes to exit CommandCode.

Environment
Operating System: Ubuntu 24.04.04 LTS
Shell: Bash 5.2.21
Terminal Emulators Tested: gnome-terminal, st
Terminal Multiplexer: tmux 3.4 (optional)
Editors Tested: vim 9.1, nano
No tmux used in some test runs

This may be a known issue, but no existing references were found.

Additional info
command-code@0.38.1

$ echo $TERM
xterm-256color

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
...
LC_NAME="en_US.UTF-8"
LC_ALL=en_US.UTF-8

$ echo $XDG_SESSION_TYPE
x11

Image Image
Expected Behavior

Typing characters should register immediately without lag or delay.
Typing a colon should behave normally (e.g., entering command mode in vim).
The terminal should remain clean and stable during the editing session.
Exiting the editor should return cleanly to the command-code prompt without visual artifacts.

Actual Behavior

Laggy/unresponsive keyboard input
Characters not registering properly
Terminal fills with colored lines/visual artifacts after pressing Enter multiple times or typing a colon
Disrupted session requiring multiple Ctrl-c to exit
Unstable terminal state

Steps to reproduce the issue

Open a terminal (gnome-terminal or st).
Press Ctrl-x Ctrl-g to launch the editor defined in $EDITOR.
Attempt to type text in the editor.
Press Enter several times or type a colon (:).

Command Code Version

0.38.1

Operating System

Linux

Terminal/IDE

st and gnome-terminal

Shell

bash

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Ctrl-x Ctrl-g editor-launch path and reproduce the issue with the listed terminals, editors, and tmux combinations. Compare input handling after launching vim or nano, then verify that characters register normally, colon and Enter behave correctly, and exiting restores a clean command-code prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, linux, vim
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.