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.
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.