# Native Codex checkpoint-hook reproduction

Environment: Linux web client, Chromium, light theme, 1280×800 CSS viewport (captures at 2× DPR); separate T3 development servers and fresh T3 databases for base and head; no production database seed. Codex CLI 0.171.0, model gpt-6-luna, API-key mode through the configured proxy.

1. Install dependencies in each checkout. Start each with `T3CODE_DEV_SEED=0 vp run dev --no-seed`.
2. Create an isolated Codex home with its own auth and proxy configuration. Configure a trusted user-scope PreCompact command hook that prints `{"continue":false,"stopReason":"Save a current task checkpoint before compaction."}`. Hook configuration is in reproduce.py. Trust the exact hook definition before starting provider processes.
3. Configure Codex instances `codex` and `hookProof` to use the installed Codex binary and this home. Set child launch arguments to `-c model_auto_compact_token_limit=20000`. Use a new provider process after changing launch arguments.
4. Run reproduce.py with checkout, T3 home, and synthetic workspace arguments. It generates a 480,000-byte payload, registers the project, and sends the identical prompt.txt through the real server CLI. Parent delegates the child; child emits progress and reads the file; the automatic compaction hook interrupts it; parent reads task_status and quotes its result.
5. Open the returned parent thread in the paired web client, record the interaction, and capture its completed reply.
6. capture-result.py extracts the actual persisted child notices and parent tool results, without inserting or changing state. Arguments: checkout, parent thread id, commit SHA, output JSON.

The lower compaction threshold makes the reported long-task condition deterministic without filling the normal context window. The model and Codex runtime are real; no provider protocol frames or orchestration state were fabricated.

Observed: both children emitted identical progress and were interrupted by the actual PreCompact hook. On base, delegate_task and task_status summaries omitted the stop reason. On head, both summaries and the parent's final quote included it. JSON transcripts contain the selected fields from the actual persisted records. Videos trim initial page navigation/loading and idle tails; no interaction frames in the reproduced delegation/result sequence were changed.
