
Codex's local memories have eleven config keys and one feature flag. Here's a conservative setup, a per-chat switch, and a script that scans the memory store for secrets.

One 60-line hook rebuilds the agent's bearings from git and a plan file after /clear and compaction, and puts a price on resuming a cold session. About fifteen minutes to set up.

Claude Code's /rewind only restores files its own edit tools touched. A 40-line UserPromptSubmit hook gives you a restore point for everything else, and it takes five minutes to set up.

Fifteen minutes to a two-line status bar showing unreviewed lines, the prompt-cache clock and how much context is left, so you stop the agent before the diff gets out of hand.

Two small scripts log every instruction file a session pulls in, why it loaded and what it costs, then flag the rules that never fire. About 15 minutes to set up.

A fresh worktree has no .env, no node_modules and the same port as the session next to it. Two small hook scripts fix all three and clean up safely. About 15 minutes to set up.

A 70-line script, a pre-commit hook and one CI step catch the frontmatter mistakes Claude Code skips without telling you. About 15 minutes to set up.

Leave a 200K-token conversation alone for about 54 minutes and Claude Code summarises it while the cache is still warm. The conditions, the two knobs, and a cost model for the trade.

On a 1M-context model, a long session drags a near-million-token history through every turn. One command sets a smaller auto-compact window, and a cost model shows where it pays off.

Goal mode keeps Codex working across turns until it believes the objective is met. A 20-line check script makes that belief verifiable.

A Claude Code subagent loads your whole CLAUDE.md hierarchy by default. The omitClaudeMd field skips it, and a ten-minute test shows what you save and what you lose.

Version 2.1.292 added an effort parameter to the Agent tool, so the main session and its helpers no longer have to think at the same depth.

claude agents gives you one screen for every background session. Here's the dispatch and triage loop, and the places it bites.

Anthropic's harness splits planning, building and testing across agents. The cost jump was 20x, and the reasons it paid off are specific.

The agent that plans and delegates never writes the code. Cursor says it can keep a project's context for months.

Anthropic's engineering team spent nearly $20,000 on it. The lessons about tests, locks and duplicate code transfer to much smaller jobs.

Worktrees stop two sessions editing the same files. They don't decide which tasks are safe to run side by side, or what to do at merge time. The flag, the gotchas, a driver script and a merge routine.

Anthropic's own advice is to prune ruthlessly. A one-question test, a short audit script that finds the stale lines for you, and a map of where each deleted rule should go instead.

Global defaults, repo rules and per-service overrides stack in a fixed order. Know it, and a monorepo stops fighting your instructions.