GrepBoard/Manuals
605 manuals ·

Claude Code Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.

·Tested on Claude Code 2.1.302 · 2026-11·Test scope ↓·3 steps

Fix the Claude Code subagent prompt flag conflict by keeping inline text or a file. To use fixed and per-run instructions, combine them in one file.

output
Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.

Claude Code received two sources for the subagent instructions and exited before starting a session. A readable file containing the same instruction as the inline string still triggers the conflict. Official error reference

[1] Find both named options in the arguments passed to claude. If a wrapper supplies the file flag and its caller adds inline text, inspect the resulting argument list. Look for subagent in both names.

These commands produced the error above in an empty test directory. The file and inline argument contained the same instruction.

console
$ printf '%s\n' 'Cite filenames.' > prompt.txt$ timeout 20 claude --append-subagent-system-prompt 'Cite filenames.' --append-subagent-system-prompt-file prompt.txt

The process exited with code 1. Pick a single source of instructions for this invocation.

[2] Choose where to maintain the instructions. Use one of the following argument fragments in your non-interactive request. CLI flag reference

Where the instructions liveArgument to keep
A short instruction supplied by the caller--append-subagent-system-prompt 'Cite filenames.'
A file containing shared rules--append-subagent-system-prompt-file prompt.txt

Both flags are intended to append instructions to subagent system prompts in non-interactive mode with -p. The conflict check above required neither a request body nor -p. The CLI reference lists v2.1.205 for inline text and v2.1.261 for the file form.

[3] Combine fixed and per-run instructions before launching. Copy the shared rules to a working file, append the per-run instruction, and check that both are present. Pass only the file flag pointing to that copy. Start the next run from the shared rules to avoid carrying old instructions forward. Documented fix

If the error names flags without subagent, check the exact pair. The v2.1.283 change described in the error reference concerns the main session's --system-prompt and --append-system-prompt, each paired with its own file form. The subagent pair still conflicts on the tested version. For a different message, see Claude Code common errors.

#claude-code#cli#subagents