fix(bin): pin Codex workers to the standard service tier - #31
Merged
Merged
Conversation
rub-a-dub-dub
added a commit
that referenced
this pull request
Sep 27, 2026
Base advanced by three commits (#31, #30, #32) since this branch last took origin/main at 929a366. Only 4e5c8ee (#31, pin Codex workers to the standard service tier) overlapped the reconciliation, in three files: - .agents/skills/harness-adapters/references/harness/codex.md: keep upstream's Effort flag row, which now advertises `max` for gpt-5.6-luna, and add the base's new Service tier row alongside it. - bin/fm-spawn.sh: carry `-c 'service_tier="default"'` on both codex launch templates, keeping upstream's `--disable hooks` on the crewmate template, and take the base's service-tier rationale into the launch contract header. - tests/fm-spawn-dispatch-profile.test.sh: register the base's new test_codex_scout_uses_standard_service_tier next to upstream's restructured max-effort and hook-layer cases, and thread the service-tier flag through upstream's own Luna max-effort launch assertion. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The captain's Codex config (~/.codex/config.toml) sets
service_tier = "priority"(shown as "fast" in the Codex status bar), and every Firstmate-launched Codex worker inherits it. Firstmate recommended keeping the model (gpt-5.6-sol, Codex's configured default) and the current effort choices, but turning priority speed off for unattended workers while keeping it for the captain's own interactive Codex sessions, because workers run with nobody waiting and priority likely spends the weekly allowance faster. Today that split is impossible: Firstmate's per-worker profile carries harness, model, and effort, not speed. The two options offered were (1) change the captain's global Codex default, or (2) have Firstmate pass standard speed only to the workers it launches. Captain's words: "Agreed with your rec" - option 2.What Changed
bin/fm-spawn.shnow appends-c 'service_tier="default"'to both codex launch templates, so every Firstmate-launched codex worker (ship, scout, secondmate, and relaunch) overrides a user-levelprioritytier for that process only, leaving the captain's own Codex config and interactive sessions untouched; a header comment records the rationale and notes that model and effort remain the profile's axes.priority, and the bundled catalog leaves the default tier unset).test_codex_scout_uses_standard_service_tiercase and secondmate/relaunch assertions — and the claude launch test assertsservice_tiernever leaks into non-codex launches.Risk Assessment
✅ Low: A one-flag, well-bounded addition to the single codex launch template that covers every Firstmate-launched codex path (ship, scout, secondmate, relaunch), leaves the captain's global Codex config untouched, and is confirmed by the installed codex 0.154.0 catalog to yield standard tier — exactly the authorized option 2.
Testing
I ran the three targeted suites the change touches (fm-spawn-dispatch-profile, fm-secondmate-harness, fm-control-relaunch) and all pass, then went past unit-level confirmation: I captured the literal command Firstmate types into a worker pane for all four Codex launch paths plus a Claude control, and the same capture against base 6ad419d shows no tier flag at all, so the before/after difference is visible at the end-user surface; the pre-fix script also fails the updated suite, making the new assertions real regression coverage. To show the emitted flag actually does what the captain asked, I exercised the real codex-cli 0.154.0 against his live
service_tier = "priority"config: an unadorned session runs on priority silently,-c 'service_tier="default"'runs clean on the configured default model gpt-5.6-sol, and an intentionally unsupported session value makes the CLI warn about the session value rather than the config file — which is the observable proof that the per-launch override wins over the user-level priority. His ~/.codex/config.toml is unchanged after every run, so interactive Codex keeps "fast". The one thing no local artifact can show is the downstream billing effect (slower weekly-allowance burn), since tier consumption is only observable on OpenAI's side; the tier selection itself is demonstrated. No linting or formatting was run and the worktree is clean, with all evidence written to the run's evidence directory.Evidence: Worker pane launch command, before (base) vs after (target), all four Codex paths + Claude control
Source: Worker pane launch command, before (base) vs after (target), all four Codex paths + Claude control
BEFORE (base 6ad419d): codex --model 'gpt-5' -c 'model_reasoning_effort="high"' --dangerously-bypass-approvals-and-sandbox [...] codex --dangerously-bypass-approvals-and-sandbox [...] # scout codex --dangerously-bypass-approvals-and-sandbox [...] # secondmate AFTER (target 8755b0c): codex --model 'gpt-5' -c 'model_reasoning_effort="high"' -c 'service_tier="default"' --dangerously-bypass-approvals-and-sandbox [...] codex -c 'service_tier="default"' --dangerously-bypass-approvals-and-sandbox [...] # scout codex -c 'service_tier="default"' --dangerously-bypass-approvals-and-sandbox [...] # secondmate claude --dangerously-skip-permissions --settings '{...}' --model 'sonnet' --effort 'high' [...] # control: no tier flagEvidence: Real codex-cli 0.154.0 transcript: session override resolves over the captain's priority tier, config untouched
Source: Real codex-cli 0.154.0 transcript: session override resolves over the captain's priority tier, config untouched
$ grep service_tier ~/.codex/config.toml # captain's interactive default 6:service_tier = "priority" A) no override -> model: gpt-5.6-sol, no warning, TIER_OK B) -c 'service_tier="default"' -> model: gpt-5.6-sol, no warning, TIER_OK C) -c 'service_tier="bogus-tier"' -> warning: Configured service tierbogus-tieris not advertised as supported for modelgpt-5.6-soland will be omitted from requests. (the warning names the SESSION value, so -c replaced the user-levelpriorityduring config resolution) $ grep service_tier ~/.codex/config.toml # after all three runs 6:service_tier = "priority"Evidence: Pre-fix suite failure (regression proof: updated assertions fail on base fm-spawn.sh)
Source: Pre-fix suite failure (regression proof: updated assertions fail on base fm-spawn.sh)
not ok - explicit harness launch did not thread model and effort (missing: 'codex --model 'gpt-5' -c 'model_reasoning_effort="high"' -c 'service_tier="default"' --dangerously-bypass-approvals-and-sandbox') ---- output --- codex --model 'gpt-5' -c 'model_reasoning_effort="high"' --dangerously-bypass-approvals-and-sandbox [...]Evidence: Launch-line capture harness used for the before/after evidence
Source: Launch-line capture harness used for the before/after evidence
Evidence: Full target-commit launch lines (unelided)
Source: Full target-commit launch lines (unelided)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-spawn.sh:1610- The standard-tier effect is achieved indirectly:service_tier="default"is not an advertised tier id in codex's bundled catalog (each model advertises only{"id":"priority","name":"Fast"}, withdefault_service_tier: null), so codex-cli 0.154.0 logs "Configured service tier…is not advertised as supported for model…and will be omitted from requests" (core/src/session/thread_settings.rs) and sends no tier — which is standard speed and correctly overrides the user-levelpriority. Verified against the installed 0.154.0 catalog and binary; noted only because the mechanism is omission rather than an explicit standard-tier id. No action needed: if a future catalog ever advertises adefaulttier, it would be sent explicitly and still mean standard.✅ **Test** - passed
✅ No issues found.
bin/fm-test-run.sh tests/fm-spawn-dispatch-profile.test.sh tests/fm-secondmate-harness.test.sh— both pass, including the newtest_codex_scout_uses_standard_service_tierand the codex/secondmate/explicit-harness launch-shape assertionsbin/fm-test-run.sh tests/fm-control-relaunch.test.sh— passes, covering the new assertion that a relaunch onto codex carries the standard service-tier overrideRegression proof:git checkout 6ad419d -- bin/fm-spawn.sh && bash tests/fm-spawn-dispatch-profile.test.sh→not ok - explicit harness launch did not thread model and effort; restored withgit checkout HEAD -- bin/fm-spawn.sh(worktree left clean)Launch-command capture via the repo's spawn fixtures and fake tmux for codex ship worker (--model gpt-5 --effort high), codex ship worker with no profile tokens,--scout,--secondmate, and aclaudecontrol — scriptcapture-codex-launch-lines.shin the evidence directory, run against both base and targetReal CLI probe,codex exec --skip-git-repo-check 'Reply with exactly: TIER_OK'on codex-cli 0.154.0, in three variants: no override (inheritspriority, no warning),-c 'service_tier="default"'(clean run on gpt-5.6-sol),-c 'service_tier="bogus-tier"'(CLI warns that the session value is unsupported, proving-coverrides the user-levelpriority)codex debug models— model catalog advertisespriorityas "Fast";grep service_tier ~/.codex/config.tomlbefore and after all runs showsservice_tier = "priority"untouchedgrep -rn dangerously-bypass-approvals-and-sandbox bin/ skills/ .agents/— confirmedbin/fm-spawn.sh:1610is the only codex launch-template owner, so no Firstmate codex launch path bypasses the overridedocs/configuration.md:309- Judgment call, no edit made: the new Codex standard-service-tier behavior is operator-visible (it changes which allowance a worker spends), and configuration.md does carry one analogous non-configurable per-launch policy inline (the claude attribution-off sentence at line 409). I left configuration.md unchanged because its "Harness support" section already delegates launch mechanics tobin/fm-spawn.sh --help, whose header is the fact's single owner and now renders the full contract plus rationale; adding a prose copy would be synchronizing a third copy of the same fact. If the captain wants the tier called out in operator docs, the right move is one sentence in "Harness support" pointing at the spawn header, not a restatement.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.