Tool tips
Claude Code and Codex tips, version-tagged and verified
Every tip lists the versions it applies to, what it depends on and when we last verified it. We read the official release notes daily and flag a tip as soon as something it relies on changes.
VerifiedNeeds recheckMay be outdatedStatus refreshes daily from the official release notes.
Claude Code · 11
By default only the launch directory is accessible. --add-dir grants extra directories, useful for split frontend/backend repos or reading another repo.
--bg returns a session id immediately while the task keeps running. List with claude agents; manage with claude attach, logs, stop.
--bare skips hooks, LSP, plugin sync, auto-memory and CLAUDE.md discovery for reproducible scripted runs. It only accepts ANTHROPIC_API_KEY or an apiKeyHelper via --settings, not subscription OAuth.
Use low effort for simple edits (faster, cheaper) and high effort for hard problems. Applies to this session only.
Falls back automatically when the main model is overloaded or unavailable; a comma list is tried in order, and the primary is retried at each user turn.
--fork-session with --continue or --resume starts a new session ID that keeps the earlier context, leaving the original untouched.
Give a PR number or URL to resume the session that created or worked on it, context intact. Without a value it opens a picker.
Non-interactive -p with --output-format json returns total_cost_usd, is_error and num_turns, handy for batch jobs and cost tracking.
Pass a JSON Schema to a -p call; the validated object appears in the structured_output field, no hand parsing or retries.
--max-budget-usd only works with -p. In our test a 0.05 USD cap was exceeded on the very first turn (cold prompt cache, ~0.105 USD) and the run ended as an error with no result. Leave headroom for the first-turn cache cost.
--permission-mode plan makes Claude research read-only and propose a plan before touching files — good for unfamiliar codebases or big refactors.
Codex · 9
codex exec (alias codex e) runs to completion without interaction; --json emits newline-delimited JSON events for programs to consume.
Give codex exec a JSON Schema file and the final response is validated against it — easy to pipe into the next step.
codex exec resume --last continues the most recent exec session in this directory, optionally with a follow-up prompt; --all searches every directory.
Type /init in the TUI to scaffold AGENTS.md. Put build commands, style rules and no-go areas there; Codex reads it every session.
Codex web search defaults to cached mode; add --search (same as web_search = "live") for brand-new releases or APIs.
--oss switches to a local open model; --local-provider lmstudio|ollama picks the backend — for offline work, sensitive code or saving money.
The docs recommend --sandbox workspace-write --ask-for-approval on-request for low-friction local work: edits inside the workspace, asks before anything beyond.
--profile name layers $CODEX_HOME/name.config.toml over the base config — keep one file per scenario such as cheap mode or strict sandbox.
--worktree starts in a fresh managed git worktree so your current checkout stays clean; works for interactive sessions, codex exec and forks (local only).