Skip to content

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

Description

@KimVatnedal

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions