feat(codex-fleet): token-discipline worker + plan-meta + tiered panes#17
Merged
NagyVikt merged 2 commits intoMay 14, 2026
Merged
Conversation
- sandbox: --add-dir built from plan metadata.writable_roots (schema: scripts/codex-fleet/lib/plan-meta.md) - bringup: writable-root preflight; cap-probe + plan-publish 5-min caches - accounts: tier (low/medium/high) + specialty fields, looked up by email - spawn: CODEX_FLEET_TIER, CODEX_FLEET_SPECIALTY, FLEET_REASONING_EFFORT wired through to fleet_render_config and the worker pane env - worker-prompt: token-discipline rewrite, preflight gates (writable-root + stale-dep), tier+specialty gate, pending-merge handoff in place of blocking --wait-for-merge - token-meter: standalone per-pane 5h%/wk%/ctx% spend-watch script - design doc: openspec plan for event-driven pulls, consolidated Rust orchestrator, send-keys-free dispatch (deferred from this PR) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # openspec/plans/codex-fleet-overlays-phase5-2026-05-14/plan.json # scripts/codex-fleet/full-bringup.sh # scripts/codex-fleet/up.sh
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.
Summary
--add-dirflags now built fromplan.json'smetadata.writable_roots(new schema atscripts/codex-fleet/lib/plan-meta.md), with hard fallback to recodee+codex-fleet. Bringup pre-validates each root exists + is writable. Fixes the wedge where panes spun onoutside writable rootsbecause the active plan targeted a sibling repo the sandbox couldn't see.accounts.ymlgainstier(low/medium/high) +specialtyfields.full-bringup.shlooks them up by email and passesCODEX_FLEET_TIER,CODEX_FLEET_SPECIALTY,FLEET_REASONING_EFFORTinto the pane env + thefleet-config.toml.tmplsubstitution. Worker prompt enforces a tier+specialty gate before claiming work.--wait-for-merge.scripts/codex-fleet/token-meter.sh— per-pane5h% / wk% / ctx%table,--watch / --json / --no-colorflags. Flags low headroom in red.--no-cap-cacheto force fresh.openspec/plans/codex-fleet-orchestration-v2-2026-05-14/design.md— concrete proposals for event-driven worker pulls, consolidated Rust orchestrator, send-keys-free dispatch. Deferred from this PR because they need Colony-side work or a larger Rust port.Test plan
bash -nclean on full-bringup.sh, up.sh, token-meter.sh, lib/mcp-preflight.shbash scripts/codex-fleet/full-bringup.sh --no-attach --n 8brings up an 8-pane fleet; each pane's spawn command showsCODEX_FLEET_TIER+CODEX_FLEET_SPECIALTY+--add-dirflagscap-probe cache hit (age=Ns))plan publish: cache hit, skipping)bash scripts/codex-fleet/token-meter.sh --no-colorrenders against live fleetpython3 -m json.tool < <(bash scripts/codex-fleet/token-meter.sh --json)validatestier=lowonly claimsdifficulty=trivialsubtasks (needs an actively running plan with mixed-difficulty subtasks to observe)🤖 Generated with Claude Code