# Contributor handoff — openai/codex

> Canonical page: https://codevetter.com/unpack/codex/agent-handoff

# Contributor handoff — openai/codex

Scanned commit a1f40f3f1326eff7c81b860a4f4e27c1be186e10 (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Work in `codex-rs` unless the task is the Node launcher or the TS/Python SDK. Read AGENTS.md before editing. Prefer a new crate or a new module over growing `codex-core`, `chatwidget.rs`, or `app.rs`. Run `just fmt` after edits and `just test -p <crate>` for the crate you touched. Do not hand-edit generated schema without the just recipe. Do not touch sandbox env-var constants. Match existing clap, serde, and ratatui styles. Integration tests, not unit tests, are required for agent-loop changes.
- Style traps: inline `format!` args; collapse nested ifs; prefer method references; no `#[async_trait]` or `#[allow(async_fn_in_trait)]` — use RPITIT with `impl Future<Output = T> + Send`. Avoid boolean or ambiguous `Option` parameters. Positional `None`/bool/number literals need `/*param_name*/` comments. — [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md)
- TUI style traps: use ratatui `Stylize` (`"text".dim()`, `.red()`) rather than `Span::styled`. Do not use `.white()`. Wrap plain strings with `textwrap::wrap` and ratatui lines with `tui/src/wrapping.rs`. Prefix lines with `prefix_lines` from line_utils. UI changes need insta snapshots. — [codex-rs/tui/styles.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/codex-rs/tui/styles.md) [codex-rs/tui/src/wrapping.rs](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/codex-rs/tui/src/wrapping.rs) [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md)
- Do not edit `CODEX_SANDBOX_NETWORK_DISABLED` or `CODEX_SANDBOX` plumbing. Those constants exist so tests skip when the agent harness has already sandboxed the process. Changing them breaks CI and the sandbox contract. — [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md) [codex-rs/core/src/sandboxing/mod.rs](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/codex-rs/core/src/sandboxing/mod.rs)
- Module size trap: files over ~800 LoC should gain a new module, not more methods. `chatwidget.rs` in particular should not grow standalone methods. When extracting, move the tests and the doc comment with the code. — [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md) [codex-rs/tui/src/chatwidget.rs](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/codex-rs/tui/src/chatwidget.rs)
- Tracing trap: instrument the function definition with `#[tracing::instrument]`, not `.instrument()` at the callsite, and do not double-instrument a callee that already has the attribute. — [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md)
- Test authoring trap: agent behavior belongs in `core/suite` using `mount_sse_once` and `pretty_assertions`. Do not add tests that only assert static tables, do not add negative tests for removed logic, and do not put test-only helpers on the public crate API. — [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md) [codex-rs/core/tests/suite](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/codex-rs/core/tests/suite)
- Docs trap: do not add product docs under `docs/` except app-server API docs. Contributor rules live in `AGENTS.md`; user docs (`config.md`, `sandbox.md`, `exec.md`, `authentication.md`) are the existing canonical pages and should be updated in place rather than duplicated. — [AGENTS.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/AGENTS.md) [docs/config.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/docs/config.md) [docs/sandbox.md](https://github.com/openai/codex/blob/a1f40f3f1326eff7c81b860a4f4e27c1be186e10/docs/sandbox.md)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
