[BUG] VS Code Extension Injects `[structural]` Marker Into User Messages
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The VS Code Claude Code extension (v2.1.206) injects a [structural] marker into user messages that were never typed by the user. This marker appears in the session JSONL logs but not in what the user typed, causing Claude's thinking process to be confused about what the user actually sent.
Example: User types only test, but the session JSONL shows Claude's thinking contains 用户发送了"[structural]" (user sent "[structural]"), disrupting the task flow.
The marker is present in .claude/projects/<project-id>/<session-id>.jsonl files but does not come from the user's keyboard input.
What Should Happen?
User messages should be recorded exactly as typed, without any markers or metadata injected into the visible message content. Any internal session classification (if [structural] represents that) should remain in metadata fields, not leak into the message text that Claude processes.
Error Messages/Logs
From JSONL session file (showing the marker appearing in Claude's thinking despite user not typing it):
{"parentUuid":"a27f6ab8-172e-4802-b8c7-40fbfbd58fd5",...,"thinking":"用户发送了\"[structural]\",这看起来是一个命令或指示..."}
The user's actual input contained no `[structural]` text.
Steps to Reproduce
- Open VS Code with Claude Code extension v2.1.206
- Send any message in the chat (example: just type
test) - Press Enter to submit
- Close the chat window
- Examine
~/.claude/projects/-Users-dfo-hymakit-lab/<session-id>.jsonl - Search for
[structural]in the file - Expected: No
[structural]marker should appear - Actual: The marker appears in Claude's thinking block despite not being in the user's typed message
Claude Model
Other
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
v2.1.206 (Anthropic VS Code Extension)
Platform
Other
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Workaround: Use the terminal CLI (cc) instead of the VS Code extension — the CLI does not inject this marker and tasks execute normally.
Impact: The injected marker disrupts Claude's reasoning about what the user actually requested, causing tasks to be interrupted or misunderstood.
Related Behavior: The CLI (kiro-cli chat) works correctly without this issue. The problem is specific to the VS Code extension's message handling layer.