Repository navigation
Description
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
- 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. - Settings → Providers → Claude → Launch arguments:
--append-system-prompt-file /path/to/extra.md - Start a new thread on that instance, so the session starts after the setting.
- Ask: "Without using any tools, what is the code word in your system prompt?"
- 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
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.
Activity
juliusmarminge commentedon Sep 27, 2026
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.
ClaudeAdapteralways starts the session with the Claude Code preset and anappendof T3's runtime instructions (buildRuntimeInstructions({ harness: "Claude Code" })inapps/server/src/provider/Layers/ClaudeAdapter.ts). Other launch arguments are forwarded as Agent SDKextraArgs, which is why--append-system-prompt-fileshows up on the process command line.The SDK does not use that flag as the append. A preset
appendis sent asappendSystemPrompton the stream-jsoninitializecontrol 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-promptand--system-prompt-fileare a different field. T3 does not send a replacementsystemPrompton 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-promptor--append-system-prompt-filein the adapter, concatenate that text with the runtime instructions onsystemPrompt.append, and drop the flags fromextraArgs. 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.