[BUG] --append-system-prompt-file silently drops all but the last occurrence when specified multiple times

Resolved 💬 4 comments Opened Mar 24, 2026 by hellipollit Closed Apr 22, 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 --append-system-prompt-file is passed more than once on a single CLI invocation, only the last --append-system-prompt-file value is applied. Earlier files are silently ignored, with no warning or error.

A natural workaround is to concatenate the files manually before passing them, but this should not be necessary.

What Should Happen?

All files should be appended in order, consistent with the flag's name and typical CLI conventions for multi-value flags.

Error Messages/Logs

Steps to Reproduce

echo "Include the word ALPHA in every response." > a.txt
echo "Include the word BETA in every response."  > b.txt

# Only BETA appears in the response — ALPHA is silently dropped
claude -p --append-system-prompt-file a.txt --append-system-prompt-file b.txt "Say hello"

# Reversing the order causes only ALPHA to appear
claude -p --append-system-prompt-file b.txt --append-system-prompt-file a.txt "Say hello"

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.81

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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