Codex Debugging
Attribution: Sourced from steipete/agent-scripts by Peter Steinberger.
When to Use
- Debugging Codex CLI/app behavior, config parsing, or tool invocations
- Navigating the codex-rs codebase (core/tui/exec/cli/app-server)
Use when investigating Codex CLI/app behavior, config parsing, tool behavior, prompts, MCP/app wiring, or runtime bugs.
Source First
Prefer local source before web/docs:
cd ~/Projects/codex
sed -n '1,220p' codex-rs/AGENTS.md
Then search targeted areas:
rg "<symbol|setting|error|feature>" codex-rs/{core,tui,exec,cli,app-server,app-server-protocol,config}
Workflow
- Identify whether the behavior is CLI, TUI, app server, protocol, config, or exec/tooling.
- Read the owning module and adjacent tests before proposing changes.
- Check local config in
~/.codex/config.toml only after understanding the source contract.
- Prefer small repros or focused tests over broad speculation.
Notes
- For OpenAI API/product docs, use the official-docs path only when source is insufficient.
- For local browser automation in CLI, use
$browser-use; the bundled Browser plugin is Codex app-only.
1---2name: codex-debugging3description: Codex debugging: codex-rs core/tui/exec/cli/app-server/config.4---56# Codex Debugging78> **Attribution:** Sourced from [steipete/agent-scripts](https://github.com/steipete/agent-scripts) by [Peter Steinberger](https://github.com/steipete).910## When to Use1112- Debugging Codex CLI/app behavior, config parsing, or tool invocations13- Navigating the codex-rs codebase (core/tui/exec/cli/app-server)1415Use when investigating Codex CLI/app behavior, config parsing, tool behavior, prompts, MCP/app wiring, or runtime bugs.1617## Source First1819Prefer local source before web/docs:2021```bash22cd ~/Projects/codex23sed -n '1,220p' codex-rs/AGENTS.md24```2526Then search targeted areas:2728```bash29rg "<symbol|setting|error|feature>" codex-rs/{core,tui,exec,cli,app-server,app-server-protocol,config}30```3132## Workflow33341. Identify whether the behavior is CLI, TUI, app server, protocol, config, or exec/tooling.352. Read the owning module and adjacent tests before proposing changes.363. Check local config in `~/.codex/config.toml` only after understanding the source contract.374. Prefer small repros or focused tests over broad speculation.3839## Notes4041- For OpenAI API/product docs, use the official-docs path only when source is insufficient.42- For local browser automation in CLI, use `$browser-use`; the bundled Browser plugin is Codex app-only.