Skip to content

feat(config): make codex reasoning effort configurable per role#17

Open
Quigleybits wants to merge 1 commit into
Intelligent-Internet:mainfrom
Quigleybits:feat/per-role-reasoning-effort
Open

feat(config): make codex reasoning effort configurable per role#17
Quigleybits wants to merge 1 commit into
Intelligent-Internet:mainfrom
Quigleybits:feat/per-role-reasoning-effort

Conversation

@Quigleybits

Copy link
Copy Markdown
Contributor

Why

Every codex ACP role — worker, validator, terminal reviewer — currently launches with a hardcoded model_reasoning_effort="xhigh" (_augment_acp_command). Validators re-checking a single assertion and the terminal reviewer don't need frontier effort on every dispatch, and today there is no knob to dial any of it down. Effort tiering per role is the cheapest cost lever available: validation lanes typically run more often than work lanes, so that's where spend concentrates on long missions.

What

Three new env vars, following the exact shape of the existing per-role provider/command config:

  • ZENITH_WORKER_REASONING_EFFORT
  • ZENITH_VALIDATOR_REASONING_EFFORT
  • ZENITH_TERMINAL_REVIEWER_REASONING_EFFORT

Semantics:

  • Backwards compatible by default: fully unset config keeps the historical xhigh; nothing changes unless opted in.
  • Same inheritance chain as providers/commands: unset roles inherit terminal_reviewer → validator → worker, resolved in for_role() exactly like worker_provider_name / worker_acp_command.
  • Allowlist-validated at discovery (minimal | low | medium | high | xhigh): the resolved value is spliced into a shell command line, and a typo'd downgrade silently ignored would keep spending xhigh — so an invalid value fails fast at HarnessConfig.discover() instead.
  • Claude/hermes paths are untouched (effort is a codex-acp -c override; other providers pass through unchanged).

Example — full-effort workers, cheaper validation lanes:

export ZENITH_VALIDATOR_REASONING_EFFORT=medium
export ZENITH_TERMINAL_REVIEWER_REASONING_EFFORT=high
# workers stay xhigh

Tests

  • Discovery: defaults to None (→ xhigh), per-role overrides, invalid value rejected with the env var named in the error.
  • for_role() cascade: single worker-level setting reaches all three roles; explicit validator setting wins and feeds the terminal reviewer fallback.
  • _augment_acp_command: override lands in the codex command line, bypass flags unaffected, claude command untouched with or without an effort.

ruff check ., mypy src, and pytest -q all pass (205 passed, 7 ACP smoke skips, Linux/py3.12, rebased on current main).

🤖 Generated with Claude Code

Every codex ACP role currently runs with a hardcoded
model_reasoning_effort="xhigh". Validators re-checking one assertion
and terminal reviewers do not need frontier effort on every dispatch,
and there was no way to dial any of it down.

Add ZENITH_WORKER_REASONING_EFFORT, ZENITH_VALIDATOR_REASONING_EFFORT,
and ZENITH_TERMINAL_REVIEWER_REASONING_EFFORT. Unset roles inherit down
the same chain the provider/command config already uses
(terminal_reviewer -> validator -> worker), and a fully unset config
keeps the historical xhigh default, so behavior is unchanged unless
opted in.

Values are validated against an allowlist at discovery: the resolved
value is spliced into a shell command line, and a typo'd downgrade
silently ignored would keep spending xhigh.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant