claude-code - 💡(How to fix) Fix [FEATURE] Custom system prompt support in desktop app and VS Code extension (parity with CLI --system-prompt-file) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60652Fetched 2026-05-20 03:52:57
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Root Cause

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.

Fix Action

Fix / Workaround

What I tried as a workaround

RAW_BUFFERClick to expand / collapse

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:

LauncherCustom system prompt?
CLI (claude.exe)yes — --system-prompt-file
VS Code extensionno — 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)

  1. A systemPromptFile setting in the Claude Code settings schema, honored by all launchers. Path to a file, resolved relative to home or repo root.
  2. A CLAUDE_CODE_SYSTEM_PROMPT_FILE environment variable that all launchers respect on session start.
  3. 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-file documentation 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING