No way to give an extension-launched session --append-system-prompt, so a session started from the CLI can't be picked up in VS Code with its config
I launch sessions from a script with custom flags, mainly --append-system-prompt.
There is no way to hand those to a session the VS Code extension starts, so I can't
continue that work in the extension without losing the setup it was running under.
The flag has no code path. It appears zero times in every build I have installed,
desktop and remote-server, three versions:
$ for d in ~/.vscode/extensions/anthropic.claude-code-* \
~/.vscode-server/extensions/anthropic.claude-code-*; do
echo "$(basename $d) $(grep -oF -- '--append-system-prompt' $d/extension.js | wc -l)"
done
anthropic.claude-code-2.1.251-linux-x64 0
anthropic.claude-code-2.1.252-linux-x64 0
anthropic.claude-code-2.1.210-linux-x64 0
It does pass --model, --effort, --name and --resume from its own UI, so this isn't a
general argv problem, there's just no path for this one. None of the 15 claudeCode.*
settings covers it either. claudeCode.claudeProcessWrapper is the only escape hatch
and it applies to every extension session, not the one you care about.
Repro. Empty folder, and two sentinels so the second is never spoken - assistant
answers get persisted to ~/.claude/projects/<slug>/*.jsonl and a later session in
that folder reads them back, which makes a single-sentinel test useless:
- mkdir ~/cc-resume-test && cd ~/cc-resume-test
- claude --name sentinel-test --append-system-prompt \
"If asked for passphrase A, reply exactly: SENT-6A4B89. If asked for passphrase B, reply exactly: SENT-E5BB43."
- Ask "what is passphrase A?" -> SENT-6A4B89. Exit. Do not ask about B.
- Teleport that session into the extension from the remote session list
(mine are RC-registered, so they show up there).
- Ask "what is passphrase B?"
Expected: SENT-E5BB43.
Actual: it doesn't have one.
SENT-E5BB43 was never emitted, and the appended prompt is not written to the
transcript (grepped, zero hits), so a correct answer could only come from the live
flag.
I only ran this over teleport. Local resume should lose it the same way, since the
flag has no code path and the prompt isn't in the transcript, but I haven't tested
that one.
Where this actually hurts me is teleport. My sessions are RC-registered, so I pick
them up through the remote list, and teleportSession() returns
{ messages, branch, localSessionId, summary, messageCount }
i.e. it reconstructs the conversation from messages into a NEW local session id.
That is a reasonable design, but it means every client-side launch flag is dropped
with no way to put it back, and no warning that anything was lost.
What I want is a way to specify launch flags for extension-started sessions - a
claudeCode.* setting, or teleport carrying the origin session's config.
Similar to #90048 (extension never passes --channels).
Claude Code 2.1.252, extension 2.1.252-linux-x64 (also checked 2.1.251 and the
2.1.210 remote-server build), VS Code 1.135.0, Ubuntu 24.04.