Codex CLI Project Rules (Irregularpedia)
Codex CLI Project Rules — IrregularChat Wiki
Section titled “Codex CLI Project Rules — IrregularChat Wiki”Reviewed 2026-10-21. The maintained wiki is apps/wiki in the IrregularChat monorepo. The former standalone IrregularChatWiki repository is archived. Repository instructions are authoritative; this page is orientation, not a substitute for reading them.
Flags to know: approvals and saved sessions
Section titled “Flags to know: approvals and saved sessions”Checked against Codex CLI 0.163.0 on 2026-10-21:
| Task | Command |
|---|---|
| Bypass approvals and command sandboxing | codex --dangerously-bypass-approvals-and-sandbox |
| Continue the latest interactive session in this directory | codex resume --last |
| Choose a saved session | codex resume |
| Resume a specific session | codex resume SESSION_ID |
| Search sessions across directories | codex resume --all |
| Include non-interactive sessions in selection | codex resume --include-non-interactive |
| Fork the latest conversation | codex fork --last |
| Run a prompt and exit | codex exec "Your task" |
| Continue a headless task | codex exec resume --last "Continue the task" |
| Choose model/working directory | codex --model MODEL_ID --cd /path/to/repo |
| Check flags/version | codex --help; codex resume --help; codex --version |
codex resume --last --dangerously-bypass-approvals-and-sandboxcodex resume SESSION_ID --dangerously-bypass-approvals-and-sandboxThe full bypass removes both approval prompts and command sandboxing. To suppress prompts while keeping workspace sandboxing, use codex --sandbox workspace-write --ask-for-approval never; denied operations fail instead of requesting approval. Neither mode removes provider policies.
resume --last is scoped to the current directory unless --all is added. Prefer the session ID when selection must be exact. A conversation fork does not by itself create a Git worktree or restore files. Codex -c means configuration override, not continue; -p means profile, not a headless prompt.
Sources: official Codex CLI reference and cross-agent quick reference.
Current capabilities and comparison
Section titled “Current capabilities and comparison”The current six-harness feature matrix includes Codex separately from the historical April benchmarks. Codex supports headless automation, dedicated review, skills/plugins, MCP, saved sessions, managed worktrees and model-specialized subagents. Official CLI reference.
Custom TOML agents can set model and reasoning effort but inherit the parent’s provider, permissions and MCP servers. This differs from independently choosing a provider for each OpenCode child. Subagent configuration.
Custom provider configuration requires Responses compatibility; --oss selects Ollama or LM Studio. A model answering a prompt does not prove reliable tool execution, caching or sandbox enforcement. Validate those independently before adding it to an automated workflow. Provider reference.
1. Scope & Stack
Section titled “1. Scope & Stack”- Source: GitLab monorepo.
- Live: Irregularpedia.
- Stack: Astro Starlight; Cloudflare Pages deployment.
- Content:
apps/wiki/src/content/docs; components and styles belong under that app.
2. Codex session checklist
Section titled “2. Codex session checklist”- Inspect branch, worktrees, current revision, and dirty paths. Preserve unrelated changes.
- Read root
AGENTS.md, relevantCLAUDE.mdguidance,.cursor/rules/frontend.mdc, andapps/wiki/CLAUDE.md. - Use Node 22+ and the exact
packageManagerversion in rootpackage.json. Dependencies are managed by the monorepo pnpm workspace and lockfile. - Use the user’s selected model/account. Announce a proposed change in billing or provider rather than assuming subscription and API usage are interchangeable.
- Define checks for the changed behavior and inspect their results independently.
Codex automatically discovers its own hierarchical project guidance. Extra instruction filenames are a separate configuration choice; a CLAUDE.md file is not universally auto-loaded. See shared rules and skills before transferring customizations between harnesses.
3. Critical rules (MUST READ)
Section titled “3. Critical rules (MUST READ)”Never display secrets, dump environments, or put credential values in process arguments. Tool availability does not authorize production changes. A worktree preserves change ownership but does not constrain shell or credential access.
Read existing components and stack conventions before editing. Keep changes focused, preserve internal links and source history, and verify behavior rather than a model’s completion claim. Security-relevant work follows the monorepo’s review and deployment requirements.
4. Repository map & commands
Section titled “4. Repository map & commands”Run from the monorepo root after installing with the pinned pnpm and existing lockfile:
pnpm --filter @irregularchat/wiki devpnpm --filter @irregularchat/wiki checkpnpm --filter @irregularchat/wiki buildpnpm --filter @irregularchat/wiki previewUse targeted tests when changing code. Content changes need a real build and inspection of rendered headings, links, tables, and code examples. Check narrow and desktop layouts when changing presentation.
5. Deployment workflow (GitLab CI)
Section titled “5. Deployment workflow (GitLab CI)”Changes reach main through merge requests on git.juntogroups.org; CI deploys the wiki and maintains the GitHub mirror. Do not push the mirror directly. Follow the app’s current deploy.sh and repository instructions for an explicitly authorized direct deployment. Do not revive the old standalone two-remote push or hand-copy build workflow.
Report the state precisely: edited, locally verified, submitted for review, released, or live verified. A local build is not evidence of production deployment.
6. Content authoring rules
Section titled “6. Content authoring rules”Use frontmatter title, description, and suitable existing tags. Use valid Starlight callouts and absolute internal wiki links. A literal pipe inside a Markdown table cell must be escaped even inside inline code. Preserve the project’s GFM configuration for MDX tables.
Forward links automatically contribute to the backlinks index; do not manually add reverse links everywhere. Keep the Recent Changes footer’s source-path behavior intact. Date volatile pricing, version, and capability claims and cite primary documentation.
7. Testing & verification
Section titled “7. Testing & verification”Inspect the actual generated pages, not only build exit status. Keep baseline failures distinct from regressions. For executable examples, check the installed tool’s help/schema and exercise representative behavior in a disposable project.
For agent-generated code, verify the diff and relevant checks. A second model’s approval is an extra lens, not acceptance evidence. See headless verification.
8. Issue playbooks (from Lessons Learned)
Section titled “8. Issue playbooks (from Lessons Learned)”Read the actual app’s lesson files before assuming a historical rule applies. Shared React components, API fallback chains, R2, D1, and clipboard handling have different app-specific requirements; do not copy unrelated product rules into every wiki session.