Codex gives the model full tool access by default. Statewright constrains it per workflow phase: read-only during planning, edit tools during implementation, designated test commands during testing. Enforcement happens at the hook layer, not via prompts.
The current 0.3.0 candidate adds per-state model and reasoning routing for managed Codex sessions. A route is applied at an authoritative Statewright boundary by restarting the managed child and resuming the same thread; it is not an in-turn model hot swap. Native Codex token totals are reported through the telemetry path, while per-tool attribution is an estimate.
Once active, the hooks inject phase context into every turn and block tools that don't belong in the current state. Try to call edit during planning and you'll see:
PreToolUse hook (blocked) feedback: Tool 'edit' is not available in the 'planning' phase. Allowed: read_file, grep. To advance, use statewright_transition with: READY.
Oh My Codex uses the same .codex/hooks.json format, so this plugin works unmodified. A dedicated OMX plugin with TypeScript hooks is available for deeper integration.