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, reload the page, and use the bell to enable notifications.

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

OpenAI

Codex — OpenAI’s coding agent

Type codex in a project folder and it starts. It reads your project, edits files and runs commands to test its own work. This page covers installing it and your first run, and links to the course chapters that go deeper.

Intermediate — daily habits: AGENTS.md, approvals and sandbox, commands

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

Writing AGENTS.md well

Codex reads AGENTS.md when it starts work. It first reads your global file (~/.codex/AGENTS.md), then walks from the top of the project (usually the top of the ) down to the current folder, 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 (commit it)
  • AGENTS.md in a subfolder — instructions added only when working in that folder
  • AGENTS.override.md — 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 KiB 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)

/init 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 Claude Code, Cursor or Gemini 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, network), and the approval policy sets when it asks you. Choose both together.

  • read-only — it only reads and changes nothing. Use it to look around a project you do not know.
  • workspace-write — it edits and runs commands only inside the working folder. In a Git repository the default is "Auto", which pairs this with on-request. The network is off by default and .git, .codex and .agents cannot be written.
  • danger-full-access — no sandbox, it can do anything. Use it only in an isolated container.
  • Approval policy (-a): on-request asks when it needs to go outside the sandbox, never does not ask (it works only inside the sandbox).
  • /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. --yolo (--dangerously-bypass-approvals-and-sandbox) turns off both the sandbox and approvals, so use it only somewhere isolated.

Commands in the chat screen

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 files changed in this session. /review — have it review the changed code.
  • /compact — summarize the conversation to free up room. /new — start a new conversation.
  • /resume — 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 MCP servers.
  • @ — find a file and attach it to the request. $ — call a skill. ! — run a shell command right away (!git status).
  • -i picture.png — start with a screenshot attached (during a conversation, paste it). --search — turn on live web search.
  • /init — create AGENTS.md. /plan — have it make a plan first.

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

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

A good request has three parts: where (files and folders), what (the behaviour you want) and how to check it (tests, commands, screens). The clearer the three are, the less Codex wanders and the more it checks its own results.

  • Vague request: "Fix the cart"
  • Clear request: "In @src/cart.ts the total becomes NaN 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 pnpm 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, roll back with git restore 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.

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-10-18. These tools change often — if a command fails, see the official docs.

Guidelines

AI

Certificate

Study

Vibe Coding

Game

Practice

Teachers

Chat

Forum

Create

Community

More

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.