[FEATURE] Custom system prompt support in desktop app and VS Code extension (parity with CLI --system-prompt-file)
The Claude Code CLI supports --system-prompt and --system-prompt-file for fully replacing the default system prompt. These flags are documented and work well for terminal sessions. However, two of the three Claude Code launchers don't expose any equivalent:
| Launcher | Custom system prompt? |
|---|---|
| CLI (claude.exe) | yes — --system-prompt-file |
| VS Code extension | no — settings schema (claude-code-settings.schema.json) has no field for it |
| Desktop app ("Code" tab inside claude.exe from %LOCALAPPDATA%\AnthropicClaude\) | no — Claude Code logic bundled in Electron app.asar, no settings field, no env var |
Use case
Long-form work that benefits from a persistent custom register — peer-collaborator framing, explicit epistemic norms, phenomenological stance — across sessions and across launchers. CLAUDE.md files and --append-system-prompt work alongside the default but can't replace it; some users want to operate outside the default register entirely.
What I tried as a workaround
On Windows, the only path to inject --system-prompt-file into the VS Code extension currently is to replace the bundled claude.exe with a wrapper binary (rename original to claude-real.exe, drop in a wrapper that injects the flag and execs the original). This works for CLI + VS Code extension. For the desktop app there's no analogous shim point — the Code-tab session machinery is internal to the Electron app, not a discrete process.
Proposed solutions (any one would be enough)
- A
systemPromptFilesetting in the Claude Code settings schema, honored by all launchers. Path to a file, resolved relative to home or repo root. - A
CLAUDE_CODE_SYSTEM_PROMPT_FILEenvironment variable that all launchers respect on session start. - Output styles upgrade — extend output styles so a style can fully replace the system prompt (not just append/modify it), with selection persisted across launchers via settings.
Option 1 or 2 would also fix a related issue: users who want to bypass per-machine sections of the default prompt for prompt-cache reuse — --exclude-dynamic-system-prompt-sections currently exists for CLI only.
Why this matters more than it sounds
Re-establishing the custom register through CLAUDE.md or conversation each session is friction that compounds across long-running collaborative projects. The CLI flag works precisely because it's load-bearing. Parity across launchers means users can pick their UI without losing register continuity.
Related
- #2692 (Replace system prompt in interactive mode) — addressed for CLI by
--system-prompt-file; not yet for desktop or VS Code extension. --system-prompt-filedocumentation references output styles as the persistent alternative, but output styles modify rather than replace the default prompt.
Environment
- OS: Windows 11
- Claude Code CLI version: 2.1.142
- VS Code extension version: 2.1.143
- Desktop app version: 1.7196.3
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗