Skip to content

[DOCS] Document Claude Code pass-through mode, system_prompt_claude_code and extra_args #322

Description

@edenreich

Summary

Since inference-gateway/cli#749, Claude Code subscription mode (claude_code.enabled: true) is a true pass-through and the docs need to reflect the new behavior and configuration surface:

  • infer no longer injects its system prompt, context blocks, or system reminders in Claude Code mode - claude runs with its own defaults and native tools. Infer prompts/reminders/tools config does not apply in this mode.
  • claude's tool calls are no longer re-executed locally; claude's own streamed tool results are carried through.
  • Native TaskCreate/TaskUpdate calls are mirrored as a synthesized TodoWrite view at the output layer only (headless stdout, consumed by infer-action); the stored conversation keeps the original calls.
  • New prompt setting: prompts.agent.system_prompt_claude_code (empty by default; when set it is passed via --append-system-prompt, keeping claude's built-in prompt intact). Env var: INFER_PROMPTS_AGENT_SYSTEM_PROMPT_CLAUDE_CODE.
  • New setting: claude_code.extra_args - extra arguments appended verbatim to the claude CLI invocation. Flag: --claude-code-extra-args; env var: INFER_CLAUDE_CODE_EXTRA_ARGS (comma/newline-separated, env wins over flag).

Example:

claude_code:
  enabled: true
  extra_args:
    - --max-turns
    - "5"
prompts:
  agent:
    system_prompt_claude_code: "Always answer in English."

Affected pages: Claude Code mode page and the CLI configuration reference (prompts + claude_code sections).

Source PR: inference-gateway/cli#749

Acceptance Criteria

  • Claude Code mode page documents the pass-through behavior (no infer prompt/reminders/tool re-execution; TodoWrite mirroring is output-layer only)
  • prompts.agent.system_prompt_claude_code documented with its env var and append semantics
  • claude_code.extra_args documented with flag/env var and precedence (env > flag > config)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Fields

    No fields configured for Task.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions