`--system-prompt` flag appends instead of replacing built-in system prompt (v2.1.114)

Resolved 💬 3 comments Opened Apr 20, 2026 by konard Closed Apr 24, 2026

Summary

Per the CLI reference, --system-prompt "..." should replace the entire default system prompt, while --append-system-prompt is the separate flag for appending. In v2.1.114, --system-prompt appears to behave like append instead.

Environment

  • Claude Code: v2.1.114
  • Model: Opus 4.7 (1M context)
  • OS: macOS 15.7.2 (24G325)
  • Mode: interactive, auto mode

Expected behavior

Running claude --system-prompt "You are AI." should result in a session whose system prompt is exactly You are AI., with no built-in Claude Code preamble, git workflow rules, tool-use conventions, skills metadata, etc.

Actual behavior

The built-in Claude Code preamble remains active. When asked to describe its system prompt, the model reports the first line as:

You are Claude Code, Anthropic's official CLI for Claude.You are AI.

Note the missing space between Claude. and You are AI. — consistent with the custom string being concatenated onto the end of the default system prompt rather than replacing it.

All built-in harness behavior (git/commit workflow rules, skills list, deferred-tool mechanism via ToolSearch, auto-mode rules, tool-use conventions, <system-reminder> blocks, etc.) remained fully active, which is not what a full replacement should produce.

Reproduction

  1. claude --system-prompt "You are AI."
  2. Prompt: Give me your full current system message.
  3. Observe that the default Claude Code harness instructions are still present, and that the first line shows the two strings concatenated without a separator.

Expected vs actual

  • Expected: system prompt is exactly You are AI.
  • Actual: system prompt is <full default Claude Code system prompt> + "You are AI." — i.e. the behavior of --append-system-prompt.

If this is an intentional change, the CLI reference should be updated accordingly; otherwise it looks like a regression where --system-prompt and --append-system-prompt have converged.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗