feat(agent-runner): an effort argument next to model on run and review (swamp-club #3570) #513
Loading…
Reference in a new issue
No description provided.
Delete branch "3570"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves swamp-club #3570.
Summary
@swamp/agent-runnercould choose an agent's model but not its effort. The runner clears the environment, soCLAUDE_CODE_EFFORT_LEVELcan't get through, and that stays as it is.runandreviewnow take an optional top-leveleffort, next tomodel: one oflow,medium,high,xhighormax. It is top-level rather than provider config, so it carries over when a caller's fallback switches provider.claude--effort <level>codex-c model_reasoning_effort=<level>(still applied under--ignore-user-config)effortis unset, no flag is sent and the CLI's default applies.runResultandreviewResult(as a data field and anefforttag), and on theagent.runspan (agent_runner.effort).AgentReviewOutputSchemathat has no effort field. That way an agent can't set the recorded effort, and a stray value from it can't fail a review.Changes
_lib/schemas.ts:EffortSchema;effortonRunArgsSchema,ReviewArgsSchema,RunResultSchemaandReviewResultSchema;AgentReviewOutputSchemafor the agent's JSON_lib/types.ts,_lib/runner.ts,_lib/tracing.ts: threadeffortthrough the run, plus a span attribute and a log line_lib/providers/claude.ts,_lib/providers/codex.ts: the flags aboveagent_runner.ts,_lib/review.ts: record effort in data and tags2026.10.17.1with an identity upgrade; manifest bumpedTesting
runandreviewexecuted against a fake cached claude binary, checking the argv it receives and the recorded data and tagsauth=cli):runwitheffort=low: repliedOK, recordedeffort: lowin data and tagreviewwitheffort=medium: completed, effort recordedeffort=extreme: rejected by argument validation-c model_reasoning_effort=maxwith the runner's flags; its API listsnone, minimal, low, medium, high, xhigh, maxas valid.Verification attestation:
bbba041e-ef5b-4954-8368-b3a2a3ea14b4(commit46e0a327, 12/14 passed, 2 guarded skips). An earlier verification round passed, but both reviews flagged that the agent's own JSON could set the recorded effort; that is fixed in the second commit.Known limitations
--effortstring, so the recorded effort is the one the runner sent, not proof the CLI used it.versionolder than the CLI's--effortsupport fails wheneffortis set. The cutoff version is not documented here.none,minimal) are not exposed.🤖 Generated with Claude Code