Skip to content

Resumed claude-cli runs keep the model, and llm.effort reaches every CLI

Refs #747.

What was wrong

  • A resumed claude-cli run (context.sessionId set) passed --resume without --model or --system-prompt. It ran on the CLI's default model and Claude Code's default system prompt, not the character's.
  • No CLI provider could set an effort or reasoning level.

What changed

  • The argv builders live in src/agent/providers/cli-argv.js, which imports nothing, so cli-argv.test.js tests the real builders under plain node --test. buildCodexCliArgs moved there from codex-cli.js, which re-exports it.
  • A resumed claude-cli run passes --model and --system-prompt. claude --help puts no restriction on --system-prompt with --resume, and documents --system-prompt-snapshot (default on): once a conversation has recorded its system prompt, a resume re-sends the record even if the launch passes different text. Passing it is harmless where snapshots apply and restores the character's prompt where they do not.
  • llm.effort (low|medium|high|xhigh|max, the values claude --effort accepts) is validated once per agent. An invalid value logs one warning and passes no flag.
Provider Flag
claude-cli --effort <level>, fresh and resumed
claude-tmux --effort <level> (every task is a fresh session)
codex-cli -c model_reasoning_effort=<value>: low/medium/high as-is, xhigh and max → xhigh

codex-cli 0.154.0 accepts none|minimal|low|medium|high|xhigh|max|ultra for model_reasoning_effort (read from its binary on 2026-09-25). The image installs @openai/codex unpinned, and older releases stop at xhigh, so max maps to xhigh, which every recent release accepts. Whether a model honours xhigh depends on the model.

Unset effort keeps each provider's argv exactly as before, and a test pins that for all three.