Skip to content

Devcontainer integrated terminal prints raw ANSI escape sequences for arrow keys (^[[A, ^[[B, …) #48355

@jamroks

Description

@jamroks

Reproduction steps

  1. Install Zed (clean install, no custom extensions required)
  2. Open a project containing a valid .devcontainer/devcontainer.json
  3. Start the Dev Container from Zed
  4. Open the integrated terminal inside the Dev Container
  5. Type any command (e.g. ls)
  6. Press arrow keys (↑ ↓ ← →)

Current vs. Expected behavior

Current behavior:
Pressing arrow keys in the integrated terminal prints raw ANSI escape sequences such as:
^[[A ^[[B ^[[C ^[[D

Arrow keys do not navigate command history or move the cursor.

Expected behavior:
Arrow keys should behave normally in an interactive shell:

  • ↑ / ↓ navigate command history
  • ← / → move the cursor within the command line
    (as observed in standard terminal emulators and VS Code devcontainer terminals)

Zed version and system specs

Zed 0.221.5
03bfbf2

0.221.5+stable.141.03bfbf242c57f7fdb45708d63d74182898edf2c5

OS: macOS 26.2
Memory: 16 GiB
Architecture: arm64

Attach Zed log file

Zed.log
No relevant errors observed in Zed logs related to terminal input handling.

Relevant Zed settings

settings.json
settings.json
{
  "terminal": {
    "shell": {
      "with_arguments": {
        "program": "/bin/zsh",
        "args": ["-i"]
      }
    }
  }
}



### Relevant Keymap

<details>
<summary>keymap.json</summary>

No custom keybindings configured. Default Zed keymap in use.

</details>



### (for AI issues) Model provider details

Additional context:
- The shell is interactive (`$-` includes `i`)
- A PTY is correctly allocated (`tty` returns `/dev/pts/0`)
- TERM is set to `xterm-256color`
- The issue does not occur in external terminals or when not using devcontainer
- The issue does not occur in VS Code devcontainer terminals

This suggests the issue is specific to Zed’s integrated terminal input handling in devcontainer sessions.


### If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dev containersFeedback for Dev Containersarea:integrations/terminalFeedback for terminal integration, shell commands, etcfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P2Average run-of-the-mill bugs

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions