[Bug]: --append-system-prompt-file in Claude launch arguments is silently ignored#13934

openedSep 27, 2026byKKimVatnedal

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Create a markdown file containing instructions the model could not otherwise know, for example a unique code word, and save it as /path/to/extra.md.
  2. Settings → Providers → Claude → Launch arguments: --append-system-prompt-file /path/to/extra.md
  3. Start a new thread on that instance, so the session starts after the setting.
  4. Ask: "Without using any tools, what is the code word in your system prompt?"
  5. Inspect the spawned process: ps -axo command | grep '[c]laude --output-format stream-json'

Expected behavior

The file's content is appended to the system prompt, as it is when the same flag is passed to claude in a terminal. Or, if T3 cannot honour it, the setting is flagged as having no effect, as #7577 proposed for --permission-mode.

Actual behavior

The flag is present in the spawned CLI's argv (... --append-system-prompt-file /path/to/extra.md), but the model does not have the content. Asked with tools forbidden, it cannot answer, and when it is allowed tools it reads the file from disk instead. Nothing in the UI shows that the argument had no effect.

Likely cause, not verified in the CLI source: ClaudeAdapter always sets systemPrompt: { type: "preset", preset: "claude_code", append: buildRuntimeInstructions(...) }, and the Agent SDK sends that append in the initialize control message. The CLI appears to use the initialize-message append in place of the file flag instead of adding the two together.

Impact

Major degradation or frequent failure

Version or commit

t3 v0.0.42 (stable, CLI service), @anthropic-ai/claude-agent-sdk 0.3.260 as reported by the spawned process, Claude Code 2.1.283

Environment

Linux (Arch), headless t3 service with the desktop app connecting over Tailscale Serve

Logs or stack traces

shell
1

Screenshots, recordings, or supporting files

No response

Workaround

A SessionStart hook in ~/.claude/settings.json that prints the file when T3CODE_HOME is set. It works, but the content lands as session context rather than in the system prompt, and it has to be split into several hook outputs, because Claude Code saves a hook output over about 10 KB to a file and gives the model only a preview.

Triage

Confirmed. This is still the case on current main, including the 0.0.43 nightly from today, so 0.0.42 is not behind a fix. I did not find a duplicate.

ClaudeAdapter always starts the session with the Claude Code preset and an append of T3's runtime instructions (buildRuntimeInstructions({ harness: "Claude Code" }) in apps/server/src/provider/Layers/ClaudeAdapter.ts). Other launch arguments are forwarded as Agent SDK extraArgs, which is why --append-system-prompt-file shows up on the process command line.

The SDK does not use that flag as the append. A preset append is sent as appendSystemPrompt on the stream-json initialize control message. Claude Code's initialize handler then assigns that value over the text it already loaded from the CLI flag (options.appendSystemPrompt = request.appendSystemPrompt) instead of concatenating them. The file is read at startup and then discarded. The process keeps running, so nothing in the UI says the argument had no effect. That matches the code-word repro: the flag is in argv, and the model does not have the file.

--append-system-prompt (the inline string) lands in the same slot and is dropped the same way. --system-prompt and --system-prompt-file are a different field. T3 does not send a replacement systemPrompt on initialize, so those are not overwritten by this path.

This is the same shape as #7577, which #11026 fixed by folding the permission launch arg into the mode T3 sends and removing it from extraArgs. These append flags need the same treatment: read --append-system-prompt or --append-system-prompt-file in the adapter, concatenate that text with the runtime instructions on systemPrompt.append, and drop the flags from extraArgs. If the file is missing or unreadable, session start should fail the way the CLI does, rather than spawn a session that is silently missing the text.

The SessionStart hook in the report is the practical workaround for now. That content stays session context rather than system-prompt text, and Claude Code still saves a large hook result to a file and only gives the model a preview.