SONUB
EN English 한국어 日本語 中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

How to enable notifications

Notifications are unavailable in this browser or on this address. Try a supported browser on the secure SONUB site.

If notifications are blocked, allow them in your browser settings.

  1. Open the site controls beside the address bar, or your browser’s site settings. Set Notifications for this site to Allow.
  2. In your device settings, allow notifications for your browser and check Do Not Disturb or Focus.
  3. Return to SONUB and reload the page. Once notifications are on, the bell disappears.

On iPhone or iPad, add SONUB to your Home Screen, open it there, then allow notifications.

Admin Log in Display theme Default theme Dark theme Pink theme Chat 1:1 Chat Group Chat Forum Notices News Suggestions Introductions Main menu Log out

Codex — OpenAI’s coding agent

You have installed it and done a first task — now build the habits you will use every day. Write well, share the same instructions with other AIs such as , decide how much to hand over with approvals and the sandbox, and learn the chat commands and how to ask well.

Models and reasoning effort — which to use (recommended: GPT-6.1 Sol, High)

)

As of November 2026, use GPT-6.1 Sol at High effort for development — set it as below or pick it with /. Every model and , and when to go lower or higher, is in Recommended use on Tool Master.

~/.codex/config.toml
model = "gpt-6.1-sol"
model_reasoning_effort = "high"
codex -m gpt-6.1-sol
codex -m gpt-6.1-sol -c model_reasoning_effort=high
codex exec -m gpt-6.1-sol "Review the current changes"

# inside Codex
/model    # model → effort (Max · Ultra: More reasoning…)

Writing AGENTS.md well

)

reads when it starts work. It first reads your file (~/.codex/AGENTS.md), then walks from the top of the project (usually the top of the ) down to the , finds one file per folder and joins them in order. Files closer to the current folder come later, so they win.

  • ~/.codex/AGENTS.md — your personal instructions for every project
  • AGENTS.md at the top of the project — instructions the team shares ( it)
  • AGENTS.md in a — instructions added only when working in that folder
  • — if it is in the same folder, it is read instead of AGENTS.md (for trying a change for a while).
  • Only up to 32 in total is read by default (project_doc_max_bytes). To use files with other names, list them in project_doc_fallback_filenames.
AGENTS.md
# AGENTS.md

## Setup
- Install: pnpm install
- Test: pnpm test
- Lint: pnpm lint

## Code style
- TypeScript strict mode, single quotes.
- Keep functions small. Add a test for every bug fix.

## Don't
- Don't edit generated files in dist/.
- Don't commit .env files.
Order
~/.codex/AGENTS.md          ← you, every project (read first)
my-project/AGENTS.md        ← team rules (commit it)
my-project/web/AGENTS.md    ← only for web/ (read last, so it wins)

reads the project and writes a first AGENTS.md. AGENTS.md is read once per run, so restart Codex after editing it.

Using it with Claude Code — instructions in one place, AGENTS.md

)

If one project uses other AIs such as , or alongside Codex, separate instruction files for each tool soon drift apart. AGENTS.md is an open format that many read, so write the rules once in AGENTS.md and every works from the same instructions.

When you use it with Claude Code, the best way is to keep no CLAUDE.md in the project and use only AGENTS.md. Without a CLAUDE.md, Claude Code reads AGENTS.md, and it still reads your global ~/.claude/CLAUDE.md. The reasons and steps are explained in Claude Code Intermediate.

  1. Write the shared rules only in AGENTS.md.
  2. Keep no CLAUDE.md in the project. If you use CLAUDE.md in even one folder, put a CLAUDE.md in every folder, each with just one line: @AGENTS.md.
  3. To change a rule, edit only AGENTS.md. Both AIs follow the changed rule.
my-project/
~/.claude/CLAUDE.md   ← personal rules for Claude Code (still loaded)
~/.codex/AGENTS.md    ← personal rules for Codex

my-project/
└── AGENTS.md         ← the rules — Codex and Claude Code both read this
                        (no CLAUDE.md in the project)

Approvals and the sandbox — how much to hand over

)

Codex keeps things safe in two ways. The sandbox sets what it can technically do (writing files, ), and the sets when it asks you. Choose both together.

  • — it only reads and changes nothing. Use it to look around a project you do not know.
  • — it edits and runs only inside the working folder. In a Git repository Codex recommends "Auto", which pairs this with on-request, but it may start in read-only until you trust the folder. The network is off by default, and .git, .agents, .codex and .aws stay read-only.
  • — no sandbox, it can do anything. Use it only in an .
  • Approval policy (-a): on-request asks when it needs to go outside the sandbox, never does not ask (it works only inside the sandbox). --approve-for-me sends eligible approval requests to automatic review without widening file or network .
  • /permissions switches modes during a conversation, and /status shows the current settings.
Terminal
codex --sandbox read-only                      # look only, change nothing
codex --sandbox workspace-write                # edit inside this folder ("Auto" in a Git repo)
codex -a never --sandbox workspace-write       # never ask, but stay inside the sandbox
~/.codex/config.toml
approval_policy = "on-request"
sandbox_mode = "workspace-write"

[sandbox_workspace_write]
network_access = false

The --full-auto in older articles no longer exists. Use --sandbox workspace-write for the same thing. = "untrusted" is also retired and can stop Codex from starting, so remove it; for read-only work use sandbox_mode = "read-only" with approval_policy = "on-request". --yolo (--dangerously-bypass-approvals-and-sandbox) turns off both the sandbox and approvals, so use it only somewhere isolated.

Slash commands and prompt shortcuts

)

Type / in the Codex chat screen and the list of commands appears. Learn the ones you use every day first.

  • /model — choose the model and how hard it thinks (reasoning effort).
  • /diff — see the Git changes in the working folder, new files included. /review — have it review the changed .
  • /compact — summarize the conversation to free up room. /new — start a new conversation.
  • — pick an earlier conversation to continue. In the terminal, codex resume or codex resume --last.
  • /status — see the current settings such as model, permissions and working folder. /mcp — see the connected .
  • @ — find a file and attach it to the request. $ — call a . ! — run a command right away (!git status).
  • When you start Codex from the terminal: -i picture.png starts with a attached (during a conversation, paste it), and --search turns on live web search.
  • /init — create AGENTS.md. /plan — have it make a plan first.
  • <> — keeps working until it is met. /goal alone shows it; /goal pause, resume and clear pause, continue and remove it (Codex 0.128.0 and later).

Coming from Claude Code? /import brings in Claude Code's setup and recent conversations.

Save context — set Codex to auto compact at 475k (SONUB setting)

)

Handing over work well — where, what and how to check

)
  • Vague request: "Fix the cart"
  • Clear request: "In @src/cart.ts the total becomes when a quantity is 0. Make it remove that item when the quantity is 0, add a test to tests/cart.test.ts and check that test passes."
  • Start a big job with "Show me only a plan first", adjust the plan, then let it go on.
  • If it changes more than you asked, stop it, undo only that file with <file> (your own unstaged edits in it are lost too) and ask again, naming the files.
  • Paste the whole error output — the original is more accurate than a summary.
  • When it is done, read the changes with /diff, run the tests yourself, then commit.

Check yourself — three quick questions

)

Look at this small project. Answer each question in your head first, then open the answer.

my-shop/
my-shop/
├── AGENTS.md
│   Test with npm test.
│   Never edit .env files.
└── services/api/
    ├── AGENTS.md
    │   Test with go test ./...
    └── orders.go
  1. You are working in services/api, and the two AGENTS.md files give different test commands. Which command does Codex use, and does the rule still apply?
    Show the answer

    It uses go test ./... — Codex joins the files from the root down, so the nearest file comes last and wins when two rules disagree. The .env rule conflicts with nothing, so it still applies.

  2. You want Codex to fix a in this folder. It must ask before it goes outside the folder or uses the network. Which settings do you start with, and why is a line in AGENTS.md not enough?
    Show the answer

    Use --sandbox workspace-write with the approval policy on-request (the Auto setting). The sandbox really limits what Codex can reach, and on-request makes it ask before going beyond that. A line in AGENTS.md is only an instruction — nothing enforces it.

  3. You checked orders.go and ran git add. Then Codex changed orders.go again and created new.go. You want to drop only the new change to orders.go. What do you run, and what happens to new.go?
    Show the answer

    Run git restore orders.go. It throws away only the unstaged change, so orders.go goes back to the you staged; any edit you made by hand after git add is lost too. new.go is untracked, so it stays until you delete it yourself.

Best practices — how OpenAI recommends using Codex

)

In short: ask with four parts (goal, , limits, done when), plan hard work first, let Codex check its own work, keep rules in AGENTS.md and use one chat per piece of work. The six good habits, with commands for both tools, are in Recommended use.

Common mistakes — and how to avoid them

)

The official guide lists eight mistakes — for example rules stuffed into the , no build or test commands, a skipped plan and full access too early. All ten mistakes from both guides, each with its fix, are in Recommended use.

Intermediate practice — try it in your own project

)
  1. Create AGENTS.md with /init and refine the test command and three rules.
  2. If you also use Claude Code, check that the project has no CLAUDE.md, so both AIs read the same AGENTS.md.
  3. Have it look around the project with codex --sandbox read-only, then hand over a small fix with workspace-write.
  4. Review the changes with /diff and /review.
  5. See the current settings with /status and continue the conversation with codex resume --last.

Done all five? Move on to the [Advanced] tab.

Official documentation

Checked against the official documentation on 2026-11-02. These tools change often — if a command fails, see the official docs.

Glossary

Pick a word you don't know. You'll see a simple explanation and related terms.

No matching term yet.

Pick a term to see its explanation.

Reading window