codexUI
AGENTS.md956 starsChanged 3 months agoMITView on GitHub
1 other project uses a version of this.
Adopted by
Most recently taken up by
- friuns2/codex-mobileword for word, first seen Aug 12, 2026
Other versions1 project uses a version of this.
Word for word · 1
- friuns2/codex-mobile★ 931100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
42 rules. About 0 are common, 21 are distinctive, and 21 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
21
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Before any merge, rebase, sync, or continuation after interruption, re-check live state:
- Very specific: line 11
Keep both worktrees clean before merge/rebase.
- Very specific: line 12
Prefer GitHub PR update/rebase/merge when a PR or GitHub merge path exists.
- Very specific: line 14
Never use automatic conflict-bias strategies blindly (-X theirs, -X ours, git checkout --theirs ., git checkout --ours .).
- Distinctive: line 15
Avoid rebasing long-lived mixed-history branches if it pulls broad unrelated conflicts.
- Very specific: line 16
If package.json, tests.md, or files under tests/ conflict during merge/rebase, start from the local/checkpoint version, then explicitly …
- Distinctive: line 17
Before local main merge, diff-compare all branch changes against main.
- Very specific: line 18
After merge/sync, verify the target really contains the commit with git branch --contains <commit>, git log --oneline origin/main -10, or a …
- Distinctive: line 22
Commit after each discrete task or sub-task.
- Distinctive: line 23
Do not batch unrelated tasks into one commit.
- Distinctive: line 24
Use a specific commit message describing the change.
- Distinctive: line 28
Treat Qodo/CodeRabbit comments as advisory, not authoritative.
- Distinctive: line 30
Do not use draft reviews or batch review APIs to trigger Qodo.
- Distinctive: line 31
Before applying a bot fix, inspect the current code path and classify the comment as real, stale/resolved, rejected, or docs-only.
- Distinctive: line 33
Prefer a focused regression test for accepted bugs.
- Distinctive: line 38
Every feature/behavior change needs a performance audit before completion.
- Very specific: line 42
Prefer profiler helpers for browser/startup/thread work: pnpm run profile:browser and pnpm run profile:thread.
- Very specific: line 44
Ensure node_modules exists.
- Very specific: line 45
Before reusing 127.0.0.1:4173, inspect the listener with lsof -nP -iTCP:4173 -sTCP:LISTEN and lsof -a -p <PID> -d cwd.
- Very specific: line 46
If 4173 belongs to another worktree, old main checkout, or stale Vite state, stop only that 4173 process and restart from the current cwd.
- Very specific: line 47
Never stop the persistent tmux server on 5173.
- Very specific: line 48
Start/current server command: pnpm run dev --host 127.0.0.1 --port 4173.
- Distinctive: line 56
Test changes before reporting completion when feasible.
- Very specific: line 57
Update the relevant manual test doc under tests/<domain>/ after feature work.
- Distinctive: line 60
Run Browser Use or Playwright only when the user explicitly asks for browser automation testing, or when a repo-specific rule below …
- Distinctive: line 65
Prefer Browser Use for navigation, clicking, typing, screenshots, snapshots, and visible local UI checks.
- Very specific: line 66
Use Playwright CLI directly when verification needs request interception/route stubbing, synthetic network failures, modifying …
- Very specific: line 67
If falling back from Browser Use, state the exact limitation, keep the same target/viewport, and save screenshots under output/playwright/.
- Distinctive: line 71
If Playwright assertions fail, fix and rerun before reporting completion.
- Very specific: line 79
Never kill or restart the tmux-managed 5173 server unless the user explicitly asks.
- Very specific: line 80
Treat 4173 as reusable/disposable verification infrastructure.
- Very specific: line 85
Do not introduce native browser dropdowns (<select>) for app controls such as provider, model, branch, runtime, folder, language, or …
- Very specific: line 91
Use this only when changes touch Docker startup, Codex auth detection, OpenCode Zen/OpenRouter/custom providers, provider model loading, …
- Distinctive: line 93
Test isolated containers on unique localhost ports for: no auth Zen fallback, invalid/expired auth Codex error persistence after reload, …
- Distinctive: line 94
Before success, report tested ports, provider/config summary, exact commands, screenshot paths, whether invalid auth persisted after …
- Distinctive: line 98
Use this for local-only feature checks that do not need packaged install behavior, for example project import/export HTTP endpoints.
- Very specific: line 101
Do not rebuild a packed-image Docker artifact for these checks unless the task specifically needs package install, npm tarball contents, …
- Very specific: line 107
Run npx validation on the Oracle host unless the user explicitly asks otherwise.
- Very specific: line 113
Prefer updating existing pages under llm-wiki/wiki/ over creating duplicates.
- Distinctive: line 114
Keep factual wiki claims tied to one or more raw source files.
- Distinctive: line 116
Never create or maintain separate wiki logging/changelog files or logging sections anywhere in the repo.
- Distinctive: line 122
Read Zen hybrid routing before changing Zen model discovery, per-model protocol dispatch, or tool-stream translation.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Git Workflow
- Before any merge, rebase, sync, or continuation after interruption, re-check live state:
- feature worktree:
git status --short,git branch --show-current - main worktree:
git status --short - in-progress state:
git status,.git/MERGE_HEAD,.git/rebase-merge,.git/rebase-apply - remote/PR state:
git fetch origin; when a PR may exist,gh pr view --json number,state,mergeStateStatus,isDraft,headRefName,baseRefName,url - branch delta:
git diff --stat main...HEADandgit log --oneline main..HEAD
- feature worktree:
- Keep both worktrees clean before merge/rebase. Checkpoint local changes in main with
git add -A && git commit -m "temp-before-merge-<branch>"; skip only if main is clean. - Prefer GitHub PR update/rebase/merge when a PR or GitHub merge path exists. Use local
mainmerge only when no PR/GitHub path exists or the user explicitly asks for a local merge. - Standard path: commit task, create/switch feature branch, rebase on
main, then use the chosen PR/local merge path. - Never use automatic conflict-bias strategies blindly (
-X theirs,-X ours,git checkout --theirs .,git checkout --ours .). Inspect conflicts intentionally. - Avoid rebasing long-lived mixed-history branches if it pulls broad unrelated conflicts. Abort and use a fresh branch from
mainplus task-relevant cherry-picks. - If
package.json,tests.md, or files undertests/conflict during merge/rebase, start from the local/checkpoint version, then explicitly compare incoming changes and reconcile required updates before continuing. - Before local
mainmerge, diff-compare all branch changes againstmain. - After merge/sync, verify the target really contains the commit with
git branch --contains <commit>,git log --oneline origin/main -10, or a file-level diff againstorigin/main.
Commits
- Commit after each discrete task or sub-task.
- Do not batch unrelated tasks into one commit.
- Use a specific commit message describing the change.
PR Review Bots
- Treat Qodo/CodeRabbit comments as advisory, not authoritative.
- For PR update + review requests: push branch, update PR summary/verification notes when changed, then post a plain PR comment containing exactly
/review. - Do not use draft reviews or batch review APIs to trigger Qodo.
- Before applying a bot fix, inspect the current code path and classify the comment as real, stale/resolved, rejected, or docs-only.
- This app server is local-user facing and is not intended to be exposed as a public internet service. Reject Qodo/CodeRabbit security hardening comments that assume a hostile remote caller for local project import/export, including saved-root allowlists, import parent restrictions, ZIP upload caps, or local path redaction, unless they identify a concrete path where this local-only server becomes remotely reachable or bypasses existing authentication.
- Prefer a focused regression test for accepted bugs. After fixing, run the narrow test plus relevant build/typecheck, push, and re-check PR comments/status.
- Completion reports must distinguish confirmed fixes from stale or rejected bot comments.
Performance
- Every feature/behavior change needs a performance audit before completion.
- Ground the audit in measurements, profiler output, traces, request counts, bundle/build output, or concrete code-path analysis. If live measurement is infeasible, say what was not measured.
- Documentation-only changes do not require a performance audit.
- For startup, thread loading, realtime rendering, routing, API, filesystem, git, or module-loading changes, explicitly check duplicate requests, blocking work, unbounded fanout, large payloads, and cache invalidation risk.
- Prefer profiler helpers for browser/startup/thread work:
pnpm run profile:browserandpnpm run profile:thread; reports land underoutput/playwright/. - Profiler server setup:
- Ensure
node_modulesexists. In side worktrees, reuse a compatible shared dependency tree instead of installing from scratch. - Before reusing
127.0.0.1:4173, inspect the listener withlsof -nP -iTCP:4173 -sTCP:LISTENandlsof -a -p <PID> -d cwd. - If
4173belongs to another worktree, old main checkout, or stale Vite state, stop only that4173process and restart from the current cwd. - Never stop the persistent tmux server on
5173. - Start/current server command:
pnpm run dev --host 127.0.0.1 --port 4173. - Reject profiler output from an error page, stale worktree, indefinite
Loading threads..., or zero API traffic caused by failed app boot. Fix readiness and rerun.
- Ensure
- General profile command:
PROFILE_BASE_URL=http://127.0.0.1:4173 PROFILE_WAIT_MS=7000 pnpm run profile:browser. - Thread route profile command:
PROFILE_BASE_URL=http://127.0.0.1:4173 PROFILE_ROUTE='#/thread/<thread-id>' PROFILE_WAIT_MS=7000 pnpm run profile:browser; usepnpm run profile:threadwhen appropriate. - Inspect
duplicateCounts,warnings,totalApiKB,topApiSummary, andslowestApiRows; open the matching trace zip withnpx playwright show-tracewhen deeper request/render timing is needed.
Tests And Verification
- Test changes before reporting completion when feasible.
- Update the relevant manual test doc under
tests/<domain>/after feature work. Keeptests.mdas the root index only. Add/adjust only the relevant section and preserve existing cases. - Manual test entries must include feature/change name, prerequisites/setup, exact actions, expected results, and rollback/cleanup notes when applicable.
- For new/changed UI, verify light and dark themes. If dark screenshots show light surfaces on a dark page, fix CSS/theme wiring.
- Run Browser Use or Playwright only when the user explicitly asks for browser automation testing, or when a repo-specific rule below requires it.
- CJS smoke test is required for package/runtime/module-loading changes: build first, run
node -e "require(...)"or the closest public CJS entry, confirm expected exports, and report the exact command/result.
Browser And Playwright
- Prefer Browser Use for navigation, clicking, typing, screenshots, snapshots, and visible local UI checks.
- Use Playwright CLI directly when verification needs request interception/route stubbing, synthetic network failures, modifying
localStorage/session storage, or other page-context mutation that the in-app Browser bridge cannot perform reliably. - If falling back from Browser Use, state the exact limitation, keep the same target/viewport, and save screenshots under
output/playwright/. - Playwright scripts should default to CJS:
const { chromium } = require('playwright'). - Playwright sequence: use
127.0.0.1:4173, verify the server is current, exercise the changed flow, capture light/dark screenshots for UI work, include 375x812 and 768x1024 for responsive/mobile changes, wait 2-3 seconds before final screenshots, and leave4173running unless asked to stop. - Screenshot reports must include tested URL, viewport, assertion/result summary, absolute screenshot path(s), and inline Markdown image(s).
- If Playwright assertions fail, fix and rerun before reporting completion.
- For chat parsing/file-link/browse-link changes, TestChat validation is mandatory: send a unique marker with representative markdown/link content, inspect the rendered row, assert
hrefOk,titleOk, andtextOk, and saveoutput/playwright/testchat-<feature>-cjs.png.
Dev Servers
- In worktrees, reuse an existing compatible
node_modulestree when available. Do not prompt to remove/recreate a shared dependency directory just to run dev commands. - Pass Vite flags directly to this repo's wrapper:
pnpm run dev --host 127.0.0.1 --port 5173; do not insert an extra--. - For dev-server fixes, verify the exact user-requested command afterward.
- Never kill or restart the tmux-managed
5173server unless the user explicitly asks. - Treat
4173as reusable/disposable verification infrastructure. Verify its cwd before using it; restart only stale4173processes.
UI Rules
- For shared route surfaces and large feature UIs, put decisive dark-theme overrides in
src/style.cssinstead of relying only on component-scoped:global(:root.dark)blocks. - Do not introduce native browser dropdowns (
<select>) for app controls such as provider, model, branch, runtime, folder, language, or settings pickers. Use the app's custom dropdown/menu components so styling, search, dark theme, and option layout stay consistent. - Browser assertions must inspect the real changed UI, not sidebar previews or base page load.
- For refresh-persistence fixes, include post-refresh evidence that the state persisted.
Provider/Auth Docker Workflow
- Use this only when changes touch Docker startup, Codex auth detection, OpenCode Zen/OpenRouter/custom providers, provider model loading, app-server config, chat send/reply handling, or failed-turn error rendering.
- Build/package first:
pnpm run build,pnpm pack --pack-destination /tmp, then build an OrbStack/Docker image installing the packedcodexapptarball plus@openai/codex, usingCODEX_HOME=/codex-homeand commandcodexapp --port ${PORT:-4190} --no-password --no-open --no-tunnel --no-login. - Test isolated containers on unique localhost ports for: no auth Zen fallback, invalid/expired auth Codex error persistence after reload, malformed auth fallback, and provider switch from Zen to OpenRouter.
- Before success, report tested ports, provider/config summary, exact commands, screenshot paths, whether invalid auth persisted after reload, and whether duplicate live overlay count was zero.
Fast Docker Feature Tests
- Use this for local-only feature checks that do not need packaged install behavior, for example project import/export HTTP endpoints.
- Build the reusable base image once with
docker build -t codexapp-fast-test-base:latest -f scripts/docker-fast-test-base.Dockerfile .. - For each test run, prefer
scripts/run-docker-fast-test.sh; it runspnpm run build, mounts the current repo read-only, reuses a DockerCODEX_HOMEvolume, and startsnode /repo/dist-cli/index.json127.0.0.1:${PORT:-4191}. - Do not rebuild a packed-image Docker artifact for these checks unless the task specifically needs package install, npm tarball contents, postinstall behavior, auth/provider startup, or published
npxbehavior. - To reset state, remove the named volume printed by the script or pass a new
CODEXAPP_DOCKER_FAST_HOME=<volume>value.
NPX / A1 Validation
- For
npxpackage behavior tests, publish first and test the published@latest. - Run
npxvalidation on the Oracle host unless the user explicitly asks otherwise. - For Oracle A1 UI validation from Mac, start the A1 server with Codex CLI in
PATHusingpnpm run dev --host 0.0.0.0 --port 4173, use the Tailscale URL such ashttp://100.127.77.25:4173, verify both UI and filesystem effects, and save screenshot evidence.
LLM Wiki
llm-wiki/raw/is immutable source material; never edit raw files after creation.- Prefer updating existing pages under
llm-wiki/wiki/over creating duplicates. - Keep factual wiki claims tied to one or more raw source files.
- For ingest: add raw source, update/create topic pages, and update
llm-wiki/wiki/index.md. - Never create or maintain separate wiki logging/changelog files or logging sections anywhere in the repo. Git commit messages are the main and only chronological log for wiki work and related documentation changes.
- For query: read
llm-wiki/wiki/index.mdfirst, then relevant pages. - For lint: check orphans and stale/contradictory claims; put follow-up questions in the relevant wiki topic page or a tracked issue, not any log/changelog file.
Wiki index
- Read Zen hybrid routing before changing Zen model discovery, per-model protocol dispatch, or tool-stream translation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

