[BUG] System prompt ignored when using --system-prompt together with --continue/--resume

Resolved 💬 4 comments Opened Nov 14, 2025 by alex-feel Closed Jan 3, 2026

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?

When launching a fresh session with --system-prompt, Claude honors the replacement system instructions. However, resuming an existing conversation via claude --system-prompt "<prompt>" --continue or --resume ignores the new system prompt. This makes --system-prompt behave inconsistently depending on whether the session is new or resumed.

What Should Happen?

Using --system-prompt together with --continue or --resume should replace the active session’s system prompt, just like it does for new sessions. That would make the CLI behavior consistent and allow users to change the guardrails of an ongoing conversation without starting over.

If the current behavior is intentional, could you clarify the rationale? Otherwise, supporting this combination would be very helpful.

Error Messages/Logs

None – there are no errors or log entries; Claude simply responds as if the default system prompt were still active.

Steps to Reproduce

  1. Run claude --system-prompt "You are restricted to the Java language right now" and ask, “What language are you restricted to?” Claude answers “Java,” confirming it respects the prompt.
  2. Exit the session.
  3. Run claude --system-prompt "You are restricted to the Java language right now" --continue (also tried passing the prior prompt as the first argument, same result).
  4. Ask the same question again. This time Claude replies that it has no restrictions and lists multiple languages, showing that the system prompt from step 3 was not applied.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.41

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

This never worked starting from 2.0.14 (--system-prompt was supported).

View original on GitHub ↗

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