Skip to content

feat(spawn): add per-invocation --effort#382

Open
hmirin wants to merge 1 commit into
fujibee:mainfrom
hmirin:agent/spawn-effort
Open

feat(spawn): add per-invocation --effort#382
hmirin wants to merge 1 commit into
fujibee:mainfrom
hmirin:agent/spawn-effort

Conversation

@hmirin

@hmirin hmirin commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • add first-class spawn.sh --effort <level> support
  • map effort to each direct CLI through type-manifest fields
  • reject unsupported direct CLI types and launcher-owned configurations instead of silently ignoring the option

Why

spawn_options.yaml applies one static set of flags per agent type. An orchestrator that chooses a different effort for each worker therefore needs to generate a temporary config or maintain a wrapper around spawn.sh.

--model already provides a per-invocation, pass-through contract. This adds the equivalent contract for effort, so callers can express the complete worker launch directly:

/agmsg spawn codex reviewer --model gpt-5 --effort xhigh

Design

  • Effort levels are passed through unchecked; the target CLI remains responsible for validation.
  • Claude declares effort_arg=--effort and receives --effort high.
  • Codex declares effort_arg=-c plus effort_value_prefix=model_reasoning_effort= and receives -c model_reasoning_effort=xhigh.
  • Types without effort_arg fail clearly.
  • Node launchers continue to own their model and effort configuration.
  • Terminal and tmux placement behavior is unchanged.

Validation

  • effort-focused Bats tests: 7/7 passed locally
  • bash -n scripts/spawn.sh
  • git diff --check origin/main
  • checked current Claude and Codex CLI help, including Codex's resumed-session -c argument placement

@hmirin
hmirin force-pushed the agent/spawn-effort branch from 7accdb3 to 14f14e4 Compare July 13, 2026 14:19
@masa6161

Copy link
Copy Markdown
Contributor

Verified on Windows 11 / MSYS2 (Git Bash): cherry-picked this PR onto latest main and spawned a codex agent with --model gpt-5.3-codex-spark --effort low. The generated boot script emits codex -m gpt-5.3-codex-spark -c model_reasoning_effort=low as designed, and the codex TUI confirms it (footer shows gpt-5.3-codex-spark low) with the agent responding normally to the boot prompt.

Works as-is on Windows — no changes needed. (Our first attempt hit a 400, but that was our own typo — dash-form model id gpt-5-3-codex-spark instead of the dotted gpt-5.3-codex-spark — which the pass-through design correctly surfaces as a CLI-side error.)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants