Claude Code plan mode: saving and sharing plans across a team
Claude Code and Codex plan mode: where each keeps the plan (Claude Code tested, Codex from its docs), how to save plans in the repo, mark which one is current, and get every teammate's agent to build from it.
By Scott Strang
Last updated
The short answer. Claude Code's plan mode saves each plan to ~/.claude/plans/ on your machine, outside the repo, and its docs say it deletes them after 30 days. Codex keeps the plan in the chat, with no plan file. To keep a plan, set "plansDirectory": "./plans" in the repo's .claude/settings.json, tell every agent in AGENTS.md to save its plan there, and commit plans like code. For a team, start each plan with a Status line (draft, approved, done, superseded, abandoned). In our test, when a teammate's later edit made a replaced plan look newest, Claude Code picked the replaced plan in 2 of 3 runs and Codex in 1 of 3; with Status lines, both picked the approved plan every time.
Where plan mode saves your plan in Claude Code, Codex, Cursor and Copilot
Claude Code, Codex, Cursor and Copilot all have a plan mode. What happens to a plan after you approve it differs by tool, and in none of them does it reach a teammate on its own: you approve a plan on Monday, and on Wednesday a teammate's agent, in another tool, plans the same feature from scratch.
| Tool | Where the plan goes | How long it stays | Can a teammate's agent read it? |
|---|---|---|---|
| Claude Code, default | A markdown file in ~/.claude/plans/ on your machine, e.g. plan-how-to-add-hidden-muffin.md (tested) | Deleted after 30 days by default (docs, cleanupPeriodDays) | No |
Claude Code with plansDirectory | The folder you set, inside the repo, e.g. plans/plan-how-to-add-pure-naur.md (tested) | Until you delete it | Once you commit it |
| Codex CLI | In the chat. "Yes, clear context and implement" carries it into a fresh chat (docs) | As long as the session | No. Codex has no setting for a plan file (docs) |
| Cursor | Your home directory; Save to workspace moves it into the repo (docs; not tested) | Not stated | Once saved and committed |
| GitHub Copilot in VS Code | Open Full Plan opens the plan in the editor; save a copy in the project to share it. The deprecated Local harness keeps it in session memory (/memories/session/plan.md) (docs; not tested) | Not stated | Once saved and committed |
Tested: the two Claude Code rows (2.1.283, Nov 20, 2026). Codex row: its docs, plus a check that Codex CLI 0.146.0 keeps no plans folder. Cursor and Copilot rows: each vendor's docs. All read Nov 20, 2026. These tools change monthly, so check the date before you rely on a row.
Keep every plan in the repo
Claude Code: set plansDirectory. Add this to .claude/settings.json at the repo root and commit it, so it applies to everyone who clones the repo:
{
"plansDirectory": "./plans"
}Claude Code resolves the path from the project root. It falls back to ~/.claude/plans/ if the path points outside the repo ("../plans") or, on macOS, Linux and WSL, contains a backslash, so write "docs/plans" (it works on Windows too), never "docs\\plans". Plans in the repo aren't on the 30-day cleanup list; that list covers files under ~/.claude/.
Codex, and every other tool: tell the agent to save the plan. Codex has no plan folder, so put the rule where Codex reads it, in AGENTS.md (below, "Tell every agent where plans live"). In our test, a headless Codex run (codex exec) asked to plan only followed that one rule in 2 of 2 runs: it wrote the plan to plans/2026-11-20-health-endpoint.md with Status: draft. Claude Code's plan mode followed it too (2 of 2), putting Status: draft at the top of the file it wrote in plans/. Claude Code keeps its own generated file name (plans/plan-how-to-add-snuggly-squirrel.md in our run); rename it when you commit if your team wants dates in the names.
Commit plans with the work. A plan in the repo is a file like any other: open a pull request for it, review it, and merge it before or with the code it describes. If a plan holds anything private, such as a customer name, keep that out of the file.
Start every plan with a Status line
A saved plan answers "what did we decide?" only if it also says whether that decision still holds. Put one line near the top of every plan, using five words your whole team agrees on:
# Plan: throttle API traffic per key
Status: approved (Nov 13)| Status | Means |
|---|---|
draft | Written, not agreed. Don't build from it |
approved | Agreed. Build from this |
done | Built. Kept for the why |
superseded by plans/<file>.md | Replaced. The line says by which plan |
abandoned | Dropped. Kept so nobody re-proposes it blind |
When a new plan replaces an old one, change the old plan's line to superseded by … in the same commit. Don't delete the old plan: it's the record of what you tried and why it changed.
Tell every agent where plans live, in AGENTS.md
Add this to the AGENTS.md at the root of the repo:
## Plans
- Plans live in plans/. Before you implement anything from a plan, save it as plans/YYYY-MM-DD-short-topic.md.
- Line 3 of every plan is a Status line: `Status: draft`, `Status: approved`, `Status: done`, `Status: superseded by plans/<file>.md` or `Status: abandoned`. New plans start as `Status: draft`.
- Build only from a plan whose status is approved.Put it in AGENTS.md, not CLAUDE.md: Codex never reads CLAUDE.md, while Claude Code (since version 2.1.277) reads AGENTS.md as long as no CLAUDE.md sits in the same folder or above it. If you keep a CLAUDE.md, make it a symlink to AGENTS.md (on Windows, a one-line CLAUDE.md that says @AGENTS.md). Our CLAUDE.md and AGENTS.md guide has the tested details.
Two plans for one feature: without a Status line, an agent can pick the one you replaced
Saving plans creates the next problem: old plans stay in the folder. We tested what a teammate's agent does when two committed plans cover the same feature. The older plan said "a global token bucket, 100 requests a second"; the newer one, which replaced it, said "per API key, 600 a minute, in Redis". We asked each agent which approach to build, using only the plans in the repo, and told it not to edit any files. The test measures which plan the agent picked, not what it built.
| Setup | Claude Code 2.1.283 | Codex 0.146.0 |
|---|---|---|
| No Status lines. The newer plan says why it replaced the old one, and was committed last | ✅ 2 of 2 picked the current plan | ✅ 2 of 2 |
| No Status lines. The newer plan doesn't mention the old one, and a teammate fixed a typo in the old plan last | ❌ 2 of 3 picked the replaced plan; 1 stopped and asked which | ❌ 1 of 3 picked the replaced plan; 2 picked the current one |
| Same as the row above, plus Status lines and the AGENTS.md rule | ✅ 2 of 2 picked the approved plan | ✅ 2 of 2 |
| Status lines and the rule, newer plan committed last | ✅ 1 of 1 | ✅ 1 of 1 |
Each run was a fresh headless session on Nov 20, 2026, in a throwaway repo (Claude Code on Sonnet, Codex on gpt-5.6-sol). Every wrong answer came after the agent read the git history, where the typo fix made the replaced plan the most recently changed; Claude Code said so outright ("most recently touched plan"). With the Status line and the AGENTS.md rule, they followed the approved plan in every run. Small runs, so treat these as a demonstration, not a rate. It's easy to rerun on your own repo: two plan files for one feature, a later typo fix to the older one, and the same question to each agent.
How we do it: we save every plan, and almost none say if they still hold
Our team rule: any material work gets a plan a person approves before code exists, and a plan made without plan mode gets saved by hand. We save plans in two places, and on Nov 20, 2026 we counted both in our GTM data repo:
- 96 saved items in Ox Plans, SageOx's plan record (more below), since Oct 13: 62 plans, 26 mockups, 4 evidence pages and 4 review pages. All 96 still say draft.
- 71 markdown plans committed in
docs/plans/. 6 have a status line, in five different wordings ("active", "building", "plan", "shipped", "for review"). None says which plan replaced which.
So we have the saving habit, not the status habit: the gap the test above shows. This guide's Status line and check are the fix we'd use.
Where it breaks for a team: plans pile up and nobody marks them
One person's plan folder is easy to keep straight: you remember which plan you replaced. A team's isn't. Four people, each planning in their own tool, each committing plans, and every agent reading every plan:
| Plan | Written by | In the file | Actually |
|---|---|---|---|
| rate limiting, global bucket | Ana (Claude Code) | no status | replaced |
| per-key throttling | Ben (Codex) | no status | current |
| auth session cleanup | Chloe (Cursor) | "building" | done |
| billing export | Dan (Claude Code) | "approved" | current |
| billing export v2 | Dan (Claude Code) | no status | abandoned |
Illustration: five plans in one repo. The names are made up; "building" and "approved" are wordings we found in our own plans. Only one of the five files says, correctly, whether to build from it.
The team-sized fix: a status check in CI, and a weekly look
Make the Status line something a machine checks, not something people remember. This script fails when a plan has no Status line, uses a word outside the five, or says it was superseded by a plan that doesn't exist:
#!/usr/bin/env bash
# check-plan-status.sh: every plan in plans/ has a Status line the team agreed on,
# and every "superseded by" points at a plan that exists.
# Usage: ./scripts/check-plan-status.sh [plans-dir] exit 1 if any plan fails
set -euo pipefail
dir="${1:-plans}"
bad=0
for f in "$dir"/*.md; do
[ -e "$f" ] || continue
line=$(grep -m1 '^Status:' "$f" | tr -d '\r' || true)
case "$line" in
"Status: draft"|"Status: draft "*|"Status: approved"|"Status: approved "*) ;;
"Status: done"|"Status: done "*|"Status: abandoned"|"Status: abandoned "*) ;;
"Status: superseded by "*)
target=$(printf '%s\n' "$line" | sed 's/^Status: superseded by \([^ ]*\).*/\1/')
[ -e "$target" ] || { echo "superseded by a plan that doesn't exist: $f -> $target"; bad=1; } ;;
"") echo "no Status line: $f"; bad=1 ;;
*) echo "unknown status: $f: $line"; bad=1 ;;
esac
done
exit "$bad"Save it as scripts/check-plan-status.sh, make it executable (chmod +x scripts/check-plan-status.sh) and run it from the repo root. We tested it with bash 3.2 (macOS) and 5.3: valid plans pass; a missing line, an unknown word, or a "superseded by" that points nowhere each fail with the file named.
To finish the job:
- Run it in CI on every pull request:
./scripts/check-plan-status.sh plans. - Name an owner for the plans folder. It doesn't have to be an engineer: whoever decides what gets built, such as a product lead or a founder, can mark a plan approved or superseded in a pull request without opening a coding agent.
- Look once a week:
grep -l '^Status: draft' plans/*.mdlists plans still waiting for a decision, andgrep -l '^Status: approved' plans/*.mdlists what should be in progress. Mark the shipped onesdone. - Repeat it per repo. Each repo keeps its own
plans/; a plan that spans repos lives in the repo where most of the work happens, with a link from the others.
Done means a teammate can open any plan in the folder and know from line 3 whether to build from it, and so can their agent.
Where SageOx helps
SageOx is not an agent. It's a tool-agnostic context layer that keeps teams of people and agents coordinated, whichever coding agent each person uses. Its plans, called Ox Plans, give the status habit a home: plans written in Claude Code or Codex are saved with a status the whole team sees.
- Your coding agent saves a visual plan of record to SageOx and renders it for review before any code is written.
- It checks your draft against what the team already knows: earlier plans on the same thing, decision records it conflicts with, and teammates working on the same code right now.
- You review a plan on a local page by commenting on a section or exact words; the agent revises; you approve.
- Ox Plans have their own lifecycle words, approved, realized (done), superseded and abandoned, with a record of which coding sessions worked on them, and the whole team sees every saved plan in one gallery in the web app, including people who never open a coding agent.
The 96 saved items counted above (62 of them plans) are already in that record, so the status habit this guide adds lands on plans we kept, not ones we lost. Checked Nov 20, 2026.
See how planning with your team's context works →
Have your agent do it
Paste this into Claude Code, Codex or another coding agent at the root of a repo. It edits files but commits nothing until you've seen the diff; once you merge it, every teammate's agent reads the same rule.
Set up this repo so plans from any coding agent are kept and every agent builds from the current one.
1. Find every plan already in the repo (plans/, docs/plans/, anything named *plan*.md). List them
with their size and last commit date. Skip node_modules.
2. Make plans/ the plans folder. Add "plansDirectory": "./plans" to .claude/settings.json
(create the file if needed; keep anything already in it).
3. Add a "Plans" section to the root AGENTS.md: plans live in plans/; save a plan there as
plans/YYYY-MM-DD-short-topic.md before implementing; line 3 is a Status line, one of draft,
approved, done, superseded by plans/<file>.md, abandoned; build only from approved plans.
If there's a CLAUDE.md and no AGENTS.md, tell me before changing anything.
4. For each existing plan, propose a Status line and say why (from its content and git history).
Where two plans cover the same thing, propose which one superseded the other. Don't guess:
mark it draft and ask me.
5. Add scripts/check-plan-status.sh (fail on a missing or unknown Status line, or a
"superseded by" that points nowhere) and show me how to run it in CI.
Show me the diff before committing anything.Questions
How do I turn on plan mode?
In Claude Code, press Shift+Tab until the status bar shows plan mode, type /plan, or start with claude --permission-mode plan. In Codex, type /plan.
Where does Claude Code save plans?
In ~/.claude/plans/ on your machine, as a markdown file with a generated name, unless you set plansDirectory in a settings file; then it writes to that folder, resolved from the project root.
How do I see the plan in Claude Code?
Press Ctrl+G at the approval prompt to open the proposed plan in your editor, or open the file in ~/.claude/plans/ (or the folder your plansDirectory names).
How long does Claude Code keep plans?
Its docs list ~/.claude/plans/ among the files it deletes once they're older than cleanupPeriodDays, which defaults to 30 days. Plans you save in the repo aren't affected.
Does Codex save plans to a file?
Not on its own: Codex's plan mode (/plan) keeps the plan in the chat, and its config has no setting for a plan file. Put a rule in AGENTS.md telling it to save plans to plans/.
Should plans go in git? Yes, for anything the team builds from: a plan in the repo gets reviewed like code and reaches every teammate and every agent that clones it. Keep private details, such as customer names, out of the file.
What's the difference between plan mode and auto mode? Plan mode lets the agent read and propose but not edit until you approve the plan. Auto mode lets it act, with a classifier reviewing commands instead of asking you each time.
Related guides
- How-to · CLAUDE.md and AGENTS.md: keeping them right for a whole team
- Template · Decision log template: one your team and its AI agents both use
- How-to · Granola MCP for a team: meeting decisions in every coding agent
Sources
Read Nov 20, 2026: Claude Code settings: plansDirectory · Claude Code: the .claude directory, cleaned up automatically · Claude Code permission modes: plan mode · Codex CLI slash commands: /plan · Codex config reference · Cursor plan mode · Copilot in VS Code: plan work with agents · SageOx Plans · ox plan commands. Tests: Claude Code 2.1.283 and Codex CLI 0.146.0, Nov 20, 2026; Cursor and Copilot not tested.

