Buckets:
| # Codex Context Lifecycle | |
| Use this adapter whenever Codex runs real or simulated harness roles. | |
| ## Visible Start Marker | |
| At harness start, show a short status block: | |
| ```text | |
| HARNESS: ON | |
| STATE: INIT | |
| PROJECT: <name> | |
| NEXT: PHASE_0 project profile | |
| ``` | |
| Do not use a decorative identity handshake. The marker is operational: it tells | |
| the user the state machine is active. | |
| ## Real Sub-Agents | |
| When the user authorizes sub-agents, spawn them only for bounded sidecar work: | |
| - one research track; | |
| - one Red/Blue/Judge role inside one debate cell; | |
| - one independent review dimension; | |
| - one disjoint Module 2 implementation file scope; | |
| - one QA pass that can run independently. | |
| The prompt must include only the current slice and a required output path. | |
| After completion, record the result in the ledger and close the agent. | |
| ## Simulated Roles | |
| When Codex runs roles locally, keep the same lifecycle: | |
| - clear the role boundary before starting; | |
| - load only the current guide and artifacts; | |
| - write the required artifact; | |
| - record the result with `record_agent_result.py`; | |
| - proceed using the artifact and ledger summary, not private scratch context. | |
| ## Ledger Command | |
| ```powershell | |
| python scripts\record_agent_result.py ` | |
| --task-dir <task_dir> ` | |
| --phase PHASE_2 ` | |
| --role red ` | |
| --agent-id red-scope-1 ` | |
| --input-summary "Boundary and failure-mode attack for scope dimension." ` | |
| --output-summary "Found one must-fix ambiguity around rollback behavior." ` | |
| --artifact debate-output.json | |
| ``` | |
| ## Close Rule | |
| For real Codex sub-agents, call the close operation after the artifact and ledger | |
| entry exist. A later step should spawn a fresh agent from the compact artifact | |
| set instead of reusing the old context. | |
Xet Storage Details
- Size:
- 1.71 kB
- Xet hash:
- a86546a8862bd34666d1742db9d9ee3b88e11df8a29e599dbffbe0e1d6a80fb3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.