[Bug] Terminal commands fail due to Cyrillic character in initial `cd` command (Windows, Ukrainian keyboard layout)

## Environment

  • OS: Windows
  • Antigravity version: latest (as of March 2026)
  • Shell: PowerShell 7.5.4
  • Keyboard layouts: Ukrainian + English (Windows)

Description

When Antigravity IDE starts a terminal session for agent command execution, the initial `cd` command to navigate to the workspace directory contains a **Cyrillic “с” (U+0441)** instead of **Latin “c” (U+0063)**, causing the command to fail with exit code 1.

This results in ALL subsequent terminal commands from the agent hanging/failing, making the terminal tool completely unusable.

Evidence from logs

**Session 2026-03-01** (`Antigravity.log`):
```
[Terminal] Command completed: сcd ‘d:\MY_PROJECT\…\OpenClaw-Connect’ exit code 1
```

**Session 2026-02-25** (`Antigravity.log`):
```
[Terminal] Command completed: сcd ‘d:\MY_PROJECT\…\bot_english_payments_anti’ exit code 1
```

Note: The first character `с` in `сcd` is Cyrillic U+0441, not Latin U+0063.

Steps to reproduce

  1. Set up Windows with Ukrainian keyboard layout as default (or have it active when launching Antigravity)
  2. Open Antigravity IDE
  3. Open any workspace
  4. Try to execute any terminal command via the agent
  5. Observe that the initial `cd` command fails with exit code 1
  6. All subsequent commands hang

Workaround

Switching to English keyboard layout BEFORE launching Antigravity resolves the issue. This confirms the bug is related to keyboard layout state during terminal initialization.

Expected behavior

The internal `cd` command generated by the language server should always use ASCII Latin characters regardless of the active keyboard layout, as it is generated programmatically and not typed by the user.

Report Generated by Opus-4.6 Agent*

Thanks for the detailed report. I’ve been digging through this and I can see the cd command is constructed as a hardcoded ASCII literal in the extension – the Cyrillic character is not coming from the string itself. That means something else is writing that character into the terminal before the cd arrives.

I have a few hypotheses but need more data to narrow it down. Could you run these tests? Each one isolates a different possible cause.


Test 1: Pre-opened terminal

Purpose: Check if the bug only happens when the agent creates a NEW terminal, or also when reusing an existing one.

Steps:

  1. Keep Ukrainian layout active.

  2. Open a terminal manually (Ctrl+`).

  3. Wait for it to fully initialize (prompt appears).

  4. Now ask the agent to run any terminal command.

  5. Report: does the сcd bug still happen?


Test 2: Check for stray character on terminal creation

Purpose: Check if the Cyrillic character appears in the terminal even without any agent command.

Steps:

  1. Keep Ukrainian layout active.

  2. Open Developer Tools: Help > Toggle Developer Tools.

  3. In DevTools Console, run:


window.activeTerminal = null;

const vscodeApi = acquireVsCodeApi ? acquireVsCodeApi() : null;

// Alternative: just use the command palette

Actually, simpler approach – just do this:

  1. Close all terminals.

  2. Open a NEW terminal (Ctrl+`).

  3. Do not type anything. Wait for the prompt to appear.

  4. Look carefully at the line – is there any character before the cursor/prompt? Take a screenshot.

  5. Now type echo hello and press Enter. Does it work, or does it show сecho hello?


Test 3: Terminal trace logging

Purpose: See the exact sequence of data written to the terminal process.

Steps:

  1. Open Command Palette (Ctrl+Shift+P).

  2. Run: Developer: Set Log Level...

  3. Select Terminal from the list.

  4. Set it to Trace.

  5. Reproduce the bug (with Ukrainian layout, ask agent to run a command).

  6. Open Command Palette again, run: Developer: Open Log File... or Output: Show Output Channels... and select Terminal.

  7. Copy the full terminal log output and share it here.

This will show every sendText call, every write to the PTY, and the exact timing.


Test 4: Layout switch timing

Purpose: Determine if the bug is tied to layout state at LAUNCH time or at COMMAND time.

Steps:

  1. Launch Antigravity with English layout active.

  2. After it fully loads, switch to Ukrainian layout.

  3. Ask the agent to run a terminal command.

  4. Report: does the bug happen?

Then the reverse:

  1. Launch Antigravity with Ukrainian layout active.

  2. After it fully loads, switch to English layout.

  3. Ask the agent to run a terminal command.

  4. Report: does the bug happen?

This tells us whether the layout matters at IDE startup or at the moment the terminal is created/used.


Test 5: DevTools Console capture

Purpose: Catch any terminal-related errors or events at the moment of failure.

Steps:

  1. Open Developer Tools (Help > Toggle Developer Tools).

  2. Go to Console tab.

  3. In the Console filter box, type Terminal to filter relevant logs.

  4. Reproduce the bug.

  5. Screenshot or copy everything that appears in the console during reproduction.


Test 6: Layout configuration details

Please confirm:

  • How many keyboard layouts do you have installed?

  • What is the switch shortcut (Alt+Shift, Win+Space, Ctrl+Shift)?

  • Is Ukrainian the DEFAULT (first) layout in Windows Settings, or secondary?

  • Windows version (e.g. 11 23H2, 11 24H2)?


Any subset of these tests would help. Tests 3 and 4 are the highest priority – the trace log will show exactly what writes to the terminal and in what order, and Test 4 will tell us whether this is a startup-time issue or runtime.