Real AI agent use cases, with sources and setup prompts

How to add memory to Claude Code, Codex and Cursor: CLAUDE.md, AGENTS.md, auto memory and shared MCP memory (2026)

Short answer: Every coding-agent session starts with an empty context, so memory means files the agent loads at the start. Layer 1 is an instructions file you write: CLAUDE.md for Claude Code (run /init to generate one, keep it under about 200 lines), AGENTS.md for Codex and Cursor, and Cursor rules in .cursor/rules/*.mdc. Write rules once in AGENTS.md and add `@AGENTS.md` to CLAUDE.md so all three tools share them. Layer 2 is memory the agent writes itself: Claude Code's auto memory is on by default and keeps notes in ~/.claude/projects/<project>/memory/ (toggle it in /memory), and Codex can keep local memories once you set `memories = true` under [features] in ~/.codex/config.toml. Layer 3, for memory shared across tools, is one MCP memory server such as Basic Memory (free, local Markdown) or the official @modelcontextprotocol/server-memory pointed at one file. Put rules that must always apply in the instructions file, not in generated memory. For long tasks, add a fourth layer: a PROGRESS.md handoff file in the repo plus a Claude Code SessionStart hook that prints it (with the last commits and uncommitted files) into the agent's context on every startup, resume, /clear and compaction, so work picks up where it stopped instead of starting over.

Write the rules once in AGENTS.md or CLAUDE.md, turn on each agent's own memory, then share one MCP memory across Claude Code, Codex and Cursor. 24 matching use cases below, each with a public source.

Looking for something else? Search all 1965 use cases or .

What you need

ToolWhat it does herePriceLink
Claude CodeReads CLAUDE.md, CLAUDE.local.md, .claude/rules/ and (from v2.1.277) AGENTS.md every session, and keeps its own auto memory notes per repo.Pro $20/mo ($17/mo yearly); Max $100/mo; not on FreeOfficial site
CodexReads ~/.codex/AGENTS.md and every AGENTS.md from the repo root down (32 KiB by default). Optional local memories generated from past chats.ChatGPT Free $0, Go $8/mo, Plus $20/mo, Pro from $100/moOfficial site
CursorProject rules in .cursor/rules/*.mdc (always, by file pattern, by description or @-mention), user rules, team rules and AGENTS.md.Free; Plus $8/mo; Premium $30/mo; Super $100/mo; Ultra $200/moOfficial site
Basic MemoryMCP server that stores memory as plain Markdown notes on your disk, so Claude Code, Codex, Cursor and Obsidian read the same notes.Free and open source (AGPL) locally; cloud $15/mo with 7-day trialOfficial site
MCP memory serverOfficial reference server: a local knowledge graph of entities, relations and observations in one JSONL file, with file locking so several clients can share it.Free, open source; needs Node.js 24+Official site
uvPython package runner Basic Memory uses (uvx). One install command.Free, open sourceOfficial site
ObsidianOptional: browse and edit the Markdown memory notes yourself, with links and search.Free appOfficial site
GitVersion CLAUDE.md, AGENTS.md and rules with the code so the whole team shares the same project memory and you can review changes.FreeOfficial site
Claude Code hooksShell commands Claude Code runs at set points. A SessionStart hook's output is added to the agent's context; a PreCompact hook's output steers what the compaction summary keeps.Free (part of Claude Code)Official site
jqSmall command-line JSON tool, handy for reading the JSON that Claude Code passes to hook scripts.Free, open sourceOfficial site

Prices are from each official page, checked Nov 12, 2026; they exclude tax and can change. Swipe the table sideways on a phone.

Claude Code: CLAUDE.md, rules and auto memory

From Anthropic's memory documentation. CLAUDE.md is what you write; auto memory is what Claude writes. Both load at the start of every session.

  1. Generate a starting CLAUDE.md and check it loads. /init analyzes the repo and writes build commands, test instructions and conventions. /context lists every memory file that loaded at launch.
    bash
    cd your-repo
    claude
    /init          # Claude reads the codebase and writes a starter CLAUDE.md
                   # (if one exists, it suggests improvements instead)
    /context       # check the file is listed under "Memory files"
    /memory        # open CLAUDE.md, CLAUDE.local.md and the auto memory folder
  2. Write facts the agent can't guess. Concrete, checkable lines under headers. Use @path imports to pull in other files (up to four hops deep). Imports organize a long file but still load into context, so keep the total short.
    markdown
    # CLAUDE.md  (target: under 200 lines; Claude reads it every session)
    ## Commands
    - Install: pnpm install
    - Test one file: pnpm vitest run path/to/file.test.ts
    - Lint before commit: pnpm lint
    
    ## Conventions
    - API handlers live in src/api/handlers/
    - Use 2-space indentation and named exports
    - Never edit files in dist/ or generated/
    
    ## Decisions (why things are the way they are)
    - We use Postgres row-level security, not app-side checks. See docs/adr/004.md
    
    ## Gotchas
    - API tests need a local Redis: docker compose up redis
    
    See @README.md for the overview and @docs/git-workflow.md for branching.
  3. Scope rules to folders and keep personal notes private. Rules in .claude/rules/ with a paths: list load only when Claude touches matching files. CLAUDE.local.md is for your own sandbox URLs and test data; gitignore it.
    markdown
    # .claude/rules/api.md  - loads only when Claude reads or edits matching files
    ---
    paths:
      - "src/api/**/*.ts"
    ---
    - Validate every input at the handler boundary with zod
    - Return { code, message } errors, never raw strings
    
    # CLAUDE.local.md  - personal, add it to .gitignore
    - My dev server runs on http://localhost:5174
    - Use the seed user test@example.local
  4. Use and prune auto memory. Say 'remember that the API tests need Redis' and Claude saves it to auto memory. It keeps a MEMORY.md index plus topic files. Review them in /memory and delete stale entries; only the first 200 lines or 25KB of the index load.
    bash
    /memory                      # toggle auto memory on/off, open the folder
    # Notes live per repo (shared across worktrees):
    ls ~/.claude/projects/*/memory/
    #   MEMORY.md          index, first 200 lines or 25KB load every session
    #   feedback_testing.md one topic file per memory, read on demand
    
    # Turn it off for one project: .claude/settings.json
    { "autoMemoryEnabled": false }
    # Or everywhere for one shell:
    export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1

Codex and Cursor: AGENTS.md, Codex memories and Cursor rules

AGENTS.md is the shared format: Codex, Cursor and Claude Code all read it. Codex adds optional local memories; Cursor adds .mdc rules.

  1. Make AGENTS.md the one shared rules file. Put shared rules in AGENTS.md at the repo root. Claude Code reads AGENTS.md only when no CLAUDE.md exists, so if you keep a CLAUDE.md, import AGENTS.md at its top.
    bash
    # One file for every agent: write the rules once in AGENTS.md
    # Codex, Cursor and Claude Code (v2.1.277+, when no CLAUDE.md exists) read it.
    
    # If you also need Claude-only notes, keep a short CLAUDE.md that imports it:
    cat > CLAUDE.md <<'EOF'
    @AGENTS.md
    
    ## Claude Code
    Use plan mode for changes under src/billing/.
    EOF
    
    # Mac/Linux-only teams can symlink instead (use the import on Windows):
    # ln -s AGENTS.md CLAUDE.md
  2. Add global Codex preferences. ~/.codex/AGENTS.md applies to every repo. Codex then adds each AGENTS.md from the repo root down to your folder, with closer files taking priority. Use AGENTS.override.md in a folder to replace the file there.
    bash
    mkdir -p ~/.codex
    cat > ~/.codex/AGENTS.md <<'EOF'
    ## Working agreements
    - Run the test suite after changing code, and show only failures.
    - Prefer pnpm when installing dependencies.
    - Ask before adding new production dependencies.
    EOF
    
    # Check what Codex loaded (global file first, then repo files root-down):
    codex --ask-for-approval never "List the instruction sources you loaded."
  3. Turn on Codex local memories. Off by default. In the ChatGPT desktop app, use Settings > Personalization > Enable Codex memories, or set the flag in config.toml. Codex writes memories in the background after a chat goes idle, skips short sessions and redacts secrets.
    toml
    # ~/.codex/config.toml
    [features]
    memories = true          # local Codex memories are off by default
    
    # Optional: keep chats that used MCP tools or web search out of memory
    [memories]
    disable_on_external_context = true
    
    # Optional: let a bigger AGENTS.md chain load (default 32 KiB)
    # project_doc_max_bytes = 65536
    
    # Inside Codex: /memories controls memory for the current chat
  4. Add a Cursor rule that points at your memory. Project rules must be .mdc files with frontmatter. alwaysApply: true loads it in every chat; globs attach it by file pattern; a description lets the agent decide.
    markdown
    # .cursor/rules/project.mdc  (Cursor ignores plain .md files in this folder)
    ---
    alwaysApply: true
    ---
    - Read AGENTS.md before starting. It holds build commands and conventions.
    - Record new decisions in docs/decisions.md with the date and the reason.
    
    # Or type /create-rule in the Cursor agent and describe the rule.

One memory shared by Claude Code, Codex and Cursor (MCP)

Instruction files are per repo. For decisions, preferences and notes you want every agent to read and write across projects, add one MCP memory server to all three tools and point them at the same store.

  1. Install uv, then add Basic Memory to each agent. Basic Memory saves notes as Markdown in a local folder, so you can read and fix them by hand or in Obsidian. Restart each tool after editing its config, and approve the server when asked.
    bash
    # Claude Code: add Basic Memory (local Markdown notes, free, open source)
    claude mcp add basic-memory -- uvx --prerelease=allow basic-memory mcp
    
    # Codex: ~/.codex/config.toml
    [mcp_servers.basic-memory]
    command = "uvx"
    args = ["--prerelease=allow", "basic-memory", "mcp"]
    
    # Cursor: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
    { "mcpServers": { "basic-memory": {
        "command": "uvx", "args": ["--prerelease=allow", "basic-memory", "mcp"] } } }
  2. Or use the official knowledge-graph server. Same idea in one JSONL file. Use the same MEMORY_FILE_PATH in every client's MCP config. Writes take turns through a lock file, so shared use doesn't lose data on a local disk (not a network drive).
    json
    # Alternative: the official MCP knowledge-graph memory server (needs Node 24+)
    # Point every client at the SAME file so they share one memory.
    {
      "mcpServers": {
        "memory": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-memory"],
          "env": { "MEMORY_FILE_PATH": "/Users/you/agent-memory/memory.jsonl" }
        }
      }
    }
    # Tools it adds: create_entities, add_observations, search_nodes,
    # open_nodes, read_graph, delete_entities, ... Writes are file-locked,
    # so Claude Code, Codex and Cursor can share one local file safely.
  3. Tell each agent when to read and write memory. Add a short rule to AGENTS.md (and CLAUDE.md through the import): 'At the start of a task, search memory for this project. When we make a decision or I correct you, save it to memory with the date.' Then test it with prompt 4 below.

A handoff log that survives restarts, /clear and compaction (15 minutes)

Instructions files tell the agent how to work; they don't tell it where it left off. On long tasks the costly failure is a fresh session (or a compacted one) that has forgotten what is done, what was tried and what's next. This path keeps that state in a PROGRESS.md file in the repo and uses two Claude Code hooks: SessionStart prints the file plus recent git history into the agent's context on every startup, resume, /clear and compaction, and PreCompact tells the summarizer what to keep. Codex and Cursor get the same file through AGENTS.md.

  1. Create PROGRESS.md in the repo root. Keep it short and newest-first: current goal, status, decisions with reasons, dead ends, and the commands that matter. Commit it so it travels with branches; add it to .gitignore instead if it shouldn't be shared.
    markdown
    # PROGRESS.md — handoff log (newest first, keep under ~80 lines)
    
    ## Current goal
    Add CSV export to the reports page (issue #142).
    
    ## Status — 2026-11-12
    - DONE: export endpoint GET /api/reports/export, tests in tests/export.test.ts pass
    - IN PROGRESS: Download button on /reports (src/pages/reports.tsx), not wired yet
    - NEXT: handle >10k rows with streaming; update docs/api.md
    
    ## Decisions (and why)
    - Using papaparse, not a hand-written CSV writer: quoting edge cases in names
    - Dates exported as ISO 8601 UTC: finance team imports into Excel
    
    ## Dead ends (don't retry)
    - res.write streaming broke the gzip middleware; see commit a1b2c3d
    
    ## Commands
    - test: npm test -- export
    - dev: npm run dev (port 3000)
  2. Save the loader script. Save this as .claude/hooks/load-progress.sh and make it executable with chmod +x .claude/hooks/load-progress.sh. Claude Code adds plain text printed by a SessionStart hook to the agent's context; anything over 10,000 characters is moved to a file and only previewed, so the script caps PROGRESS.md at 6,000 characters.
    bash
    #!/usr/bin/env bash
    # .claude/hooks/load-progress.sh — prints the handoff log so Claude sees it at session start.
    # Plain text printed by a SessionStart hook is added to Claude's context (keep it under 10,000 characters).
    cd "${CLAUDE_PROJECT_DIR:-.}" || exit 0
    echo "## Handoff log (PROGRESS.md)"
    if [ -f PROGRESS.md ]; then head -c 6000 PROGRESS.md; else echo "No PROGRESS.md yet. Create one before ending this session."; fi
    echo
    echo "## Last 10 commits"
    git log --oneline -10 2>/dev/null
    echo
    echo "## Uncommitted files"
    git status --short 2>/dev/null | head -40
    exit 0
  3. Register the hooks in .claude/settings.json. SessionStart with the matcher startup|resume|clear|compact fires on a new session, --resume or --continue, /clear, and after compaction. PreCompact's output becomes instructions for the compaction summary. Put this in the project's .claude/settings.json (shared) or .claude/settings.local.json (just you).
    json
    {
      "hooks": {
        "SessionStart": [
          {
            "matcher": "startup|resume|clear|compact",
            "hooks": [
              { "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/load-progress.sh" }
            ]
          }
        ],
        "PreCompact": [
          {
            "matcher": "manual|auto",
            "hooks": [
              { "type": "command", "command": "echo 'Keep in the summary: the current goal, every file changed and why, decisions with reasons, dead ends, and the exact next step. Drop raw command output.'" }
            ]
          }
        ]
      }
    }
  4. Check it loads. Start a new session and type /hooks to see both hooks listed with their source file. Then ask the agent what it knows about the current task; it should quote the goal and next step from PROGRESS.md without opening the file.
    bash
    chmod +x .claude/hooks/load-progress.sh
    .claude/hooks/load-progress.sh | head -20   # dry run: should print the log and git info
    claude
    /hooks     # SessionStart and PreCompact listed under project settings
    > What is the current goal and the next step?
  5. Tell every agent to keep the log current. Add these lines to AGENTS.md (and import it from CLAUDE.md with @AGENTS.md) so Codex and Cursor follow the same habit, even though they don't run the Claude Code hooks.
    markdown
    ## Handoff log
    - At the start of every task, read PROGRESS.md.
    - After each finished step, and before you stop, update PROGRESS.md: move items to DONE,
      set the exact NEXT step, and add any decision (with the reason) or dead end.
    - Keep PROGRESS.md under 80 lines: delete DONE items older than a week.

Further reading: Anthropic: How Claude remembers your project (CLAUDE.md and auto memory)

Further reading: OpenAI: Custom instructions with AGENTS.md

Further reading: OpenAI: Codex memories

Further reading: Cursor: Rules

Further reading: MCP knowledge-graph memory server

Further reading: How to use Claude Code and Codex together Hand work between Claude Code and Codex: the official Codex plugin, /codex:transfer and an automated build-then-review loop.

Further reading: How to run multiple coding agents at once Run agents in parallel with a shared docs/PLAN.md so each knows its task and files.

Further reading: How to build your own coding agent or harness Building your own harness? Start with the Claude Agent SDK or a 60-line loop, then add memory.

Further reading: How to control Claude Code and Codex by voice Speak long task descriptions to your agent and keep its spoken-name glossary in memory.

Further reading: How to port code to another language with AI Keep a long port on track with a PORTING.md plan the agent reads every run.

Copy-paste prompts

Written for this setup. Replace anything in [brackets] before you send it.

1. Write my CLAUDE.md / AGENTS.md

New repo, or a file that has grown messy

Read this repo: package files, README, CI config, scripts and the folder layout. Write an AGENTS.md under 150 lines with these sections: Commands (exact install, test-one-file, lint and build commands), Conventions (only ones you can see in the code), Layout (where key things live), Decisions (anything non-obvious, with the file that explains it) and Gotchas. Every line must be concrete and checkable. Don't include generic advice the model already knows. Then create CLAUDE.md containing just '@AGENTS.md'. Show me both files before saving.

2. Turn my corrections into memory

End of a session where you corrected the agent

Look back over this session. List every time I corrected you, rejected an approach or explained something about this project. For each, propose one short, specific line and say where it belongs: AGENTS.md (applies to everyone, always), a path-scoped rule (only for certain folders, give the glob), CLAUDE.local.md (only me), or auto memory (a preference or context, not a rule). Don't save anything until I approve the list.

3. Audit my memory files

Once a month, or when the agent ignores a rule

Read every instruction and memory file that loads for this project: CLAUDE.md, CLAUDE.local.md, AGENTS.md, .claude/rules/, .cursor/rules/ and the auto memory MEMORY.md index. Find: rules that contradict each other, references to files, commands or packages that no longer exist, vague lines that can't be checked, duplicates, and anything over the size limits (200 lines for CLAUDE.md, 200 lines or 25KB for MEMORY.md). Give me a table of problems and a proposed edit for each. Change nothing until I say so.

4. Test shared MCP memory

Right after connecting Basic Memory or the memory server

Using the memory MCP server only: 1) save a note titled 'memory-test' saying 'The [project] staging database is read-only on Fridays', tagged with this project name and today's date. 2) Search memory for 'staging database' and show me what came back. 3) Tell me the exact file path where it was stored. I'll then ask another agent (Codex or Cursor) to search for it to confirm they share the same memory.

5. Start a task from memory

First message of a new session

Before you change anything: read AGENTS.md, then search memory for notes about [feature or area] and for any decisions or corrections about this project from the last 30 days. Summarize in 5 bullets what you know that matters for this task, and flag anything that looks out of date. Then propose a plan and wait for my OK.

6. Hand off between agents

Switching from Claude Code to Codex or Cursor (or back)

I'm switching tools. Write a handoff note to memory (and to notes/handoff.md) with: the goal, what's done, files changed, decisions made and why, what failed and why, the next 3 steps, and the exact command to run the tests. Keep it under 25 lines. The next agent should be able to continue from this note alone.

7. Clean up stale memory

When memory starts returning old or wrong facts

List every memory entry for this project with its date. Mark each as keep, update or delete: delete anything about code, files or tools that no longer exist, merge duplicates, and rewrite anything contradicted by the current code. Show me the list first. After I approve, apply it and keep the MEMORY.md index to one line per memory.

8. Set up the handoff log

Once per repo.

Set up a handoff log for this repo:
1. create PROGRESS.md in the root with sections: Current goal, Status (DONE / IN PROGRESS / NEXT), Decisions (and why), Dead ends, Commands. Fill it from the git log and open TODOs.
2. create .claude/hooks/load-progress.sh that prints PROGRESS.md (first 6,000 characters), git log --oneline -10 and git status --short, and make it executable
3. add a SessionStart hook with matcher startup|resume|clear|compact that runs it, in .claude/settings.json
4. add the Handoff log rules to AGENTS.md
Show me every file before you write it.

9. Update the log before stopping

End of every working session.

Before we stop, update PROGRESS.md:
- move finished items to DONE with the file names
- set NEXT to the single exact next step (file, function, command)
- add any decision we made today with the reason, and anything we tried that failed to Dead ends
- delete DONE items older than a week so it stays under 80 lines
Then show me the diff and commit it as 'progress: <one-line summary>'.

10. Resume after a break

First prompt of a new session.

Using the handoff log you were given at startup, tell me in five lines: the goal, what's done, what's half-done, the next step, and any dead end to avoid.
If the log disagrees with git status or the last commits, say which is right and fix PROGRESS.md.
Then do the next step only, and stop for review.

11. Hand off from Claude Code to Codex

Switching agents mid-task.

I'm switching this task to Codex. Rewrite PROGRESS.md so another agent with no chat history can continue: goal, exact status per file, the test command and its current result, decisions, dead ends, and the next three steps in order.
No references to our conversation like 'as discussed'. Commit it.

12. Shrink a bloated memory setup

When sessions start slow or the agent ignores rules.

Measure what loads at session start: CLAUDE.md and its imports, .claude/rules, auto memory MEMORY.md, AGENTS.md and the SessionStart hook output.
Give me a table: file, lines, approximate tokens, and what's duplicated or stale.
Propose cuts that bring the total under 300 lines without losing any rule that must always apply. Don't edit until I approve.

Safety checklist

Related guides: How to use Claude Code and Codex together (Codex plugin, shared AGENTS.md, worktrees, auto cross-review and GitHub Actions) · How to build an AI second brain (Karpathy-style LLM wiki) with Obsidian and Claude Code: setup, prompts and costs · How to cut Claude Code, Codex and Cursor costs: commands, settings and prompts that save tokens (Nov 2026) · How to write a CLAUDE.md or AGENTS.md file: one rules file for Claude Code, Codex, Cursor, Copilot and Gemini, with templates · How to build agent memory and context layers · How to use AI agents with Obsidian notes (CLI, Claude Code, MCP) · How to use Claude Code skills and plugins · How to use Cursor agents and automations · How to run Claude Code and Codex in a desktop app (T3 Code, Codex app, Claude Desktop)

What it costs

The Daily 5

Get five new use cases like these tomorrow morning

Five new real AI use cases every morning. Free. Unsubscribe any time.

Real examples (24)

Dev & opsHacker News · murtazayusuf

Build a Redis-compatible database in Rust with Claude as your pair

A developer started KiviDB in February to learn Rust after hitting GC pauses and out-of-memory crashes with Dragonfly at work. He used AI a lot but made the design decisions himself, based on tests Claude picked from his history of troubleshooting sessions. It speaks RESP2 and RESP3, shards the keyspace across threads and uses io_uring on Linux.

See pricing pageWeeksAdvanced

Common questions

How do you add memory to Claude Code, Codex and Cursor: CLAUDE.md, AGENTS.md, auto memory and shared MCP memory (2026)?
Every coding-agent session starts with an empty context, so memory means files the agent loads at the start. Layer 1 is an instructions file you write: CLAUDE.md for Claude Code (run /init to generate one, keep it under about 200 lines), AGENTS.md for Codex and Cursor, and Cursor rules in .cursor/rules/*.mdc. Write rules once in AGENTS.md and add `@AGENTS.md` to CLAUDE.md so all three tools share them. Layer 2 is memory the agent writes itself: Claude Code's auto memory is on by default and keeps notes in ~/.claude/projects/<project>/memory/ (toggle it in /memory), and Codex can keep local memories once you set `memories = true` under [features] in ~/.codex/config.toml. Layer 3, for memory shared across tools, is one MCP memory server such as Basic Memory (free, local Markdown) or the official @modelcontextprotocol/server-memory pointed at one file. Put rules that must always apply in the instructions file, not in generated memory. For long tasks, add a fourth layer: a PROGRESS.md handoff file in the repo plus a Claude Code SessionStart hook that prints it (with the last commits and uncommitted files) into the agent's context on every startup, resume, /clear and compaction, so work picks up where it stopped instead of starting over.
Does Claude Code remember between sessions?
Yes, through files. It loads your CLAUDE.md files (and AGENTS.md when there's no CLAUDE.md) at the start of every session, plus its own auto memory notes from ~/.claude/projects/<project>/memory/. Auto memory is on by default for local sessions; toggle it in /memory. The chat itself isn't carried over unless you resume it.
What's the difference between CLAUDE.md and auto memory?
You write CLAUDE.md: rules, commands and conventions, shared with your team through git. Claude writes auto memory: your preferences, corrections and project context it can't get from the code, stored on your machine per repo. Both load every session.
Should I use CLAUDE.md or AGENTS.md?
If you use more than one agent, write AGENTS.md: Codex, Cursor and Claude Code (v2.1.277 or later) all read it. Claude reads it only when there's no CLAUDE.md, so if you keep a CLAUDE.md for Claude-only notes, put `@AGENTS.md` at its top.
Does Codex have memory?
Yes. It always reads AGENTS.md files (global ~/.codex/AGENTS.md plus the repo chain, up to 32 KiB by default). Local memories built from past chats are off by default; turn them on in the ChatGPT desktop app under Settings > Personalization, or with `memories = true` under [features] in ~/.codex/config.toml. Use /memories to control a single chat.
How do I share memory between Claude Code, Codex and Cursor?
Use AGENTS.md for shared rules, then add one MCP memory server to all three, such as Basic Memory (Markdown notes) or @modelcontextprotocol/server-memory with the same MEMORY_FILE_PATH. Add a rule telling each agent to search memory at the start of a task and save decisions when they're made.
Why is my agent ignoring CLAUDE.md?
Run /context to check it loaded. Then look for vague or conflicting lines, a file that's too long, or a subfolder CLAUDE.md that only loads when Claude works in that folder. Claude Code's `/doctor prompt-audit` finds outdated or contradicting instructions. If it must always happen, use a hook instead.
How do I make Claude Code remember progress after /clear or compaction?
Keep the state in a PROGRESS.md file and add a SessionStart hook with the matcher startup|resume|clear|compact that prints it. Claude Code adds a SessionStart hook's plain-text output to the agent's context, so the goal, status and next step come back automatically after every restart, /clear and compaction.
What does a PreCompact hook do?
It runs just before Claude Code compacts the conversation, either manually with /compact or automatically. Whatever the hook prints becomes instructions for the compaction summary, so you can tell it to keep the goal, changed files, decisions and next step. It can also block compaction by exiting with code 2.
Is a handoff file better than auto memory?
They do different jobs. Auto memory collects lasting facts about the project and your preferences. A handoff file records where the current task stands. Use both: rules in CLAUDE.md or AGENTS.md, learned facts in auto memory, and task state in PROGRESS.md.
Do Codex and Cursor run Claude Code hooks?
No. The .claude/settings.json hooks are Claude Code only. Give Codex and Cursor the same habit with an AGENTS.md rule to read PROGRESS.md at the start of every task and update it before stopping.
Which AI tools do people use to add memory to Claude Code, Codex and Cursor: CLAUDE.md, AGENTS.md, auto memory and shared MCP memory (2026)?
Across the 24 sourced use cases in this guide, the most used tools are Claude Code, OpenAI Codex, Cursor, Codex, Claude.
How much does it cost to get started?
0 of the 24 use cases can start on a free plan. The most common paid starting price is $17/mo (12 use cases). Prices come from each tool's official pricing page.
How long does setup take?
8 of the 24 use cases list a setup time of an hour or less. Each card shows the setup time the builder reported.
Are these real examples?
Yes. Every use case links to its public source (an X post, a Hacker News thread or a GitHub repo) with the author and date, so you can check it yourself.

The Daily 5

Liked this guide? Get five new use cases tomorrow morning

Five new real AI use cases every morning. Free. Unsubscribe any time.

More how-to guides

How to make faceless YouTube videos with AI: tools, commands, prompts and YouTube's 2026 rules · How to automate work with n8n and AI · How to vibe code an app with Claude Code · How to build AI agents for SEO and ads · How to run multiple coding agents at once (git worktrees, tmux, Claude Code agent teams, Codex and Cursor) · How to build an MCP server for AI agents · How to secure a vibe-coded app before you launch · How to observe and debug AI agents · How to build agent memory and context layers · How to control Claude Code and Codex from your phone (Remote Control, ChatGPT app, SSH and tmux) · How to add payments to vibe-coded apps · How to run local LLMs with AI agents (Claude Code, Codex and OpenCode on Ollama, LM Studio or llama.cpp) · How to set up Grok Bot agents for real work: first Bot, routines, webhooks and a team of Bots, with prompts · How to build with Gemini 4 Argon (API, Antigravity CLI, and the Dec 1 2026 price change) · How to use AI for taxes, bills and budgets: build a budget from bank CSVs, catch bill increases and check your tax return · How to make AI video ads and Reels with agents · How to set up Hermes Agent workflows · How to vibe code a game with AI: one-file browser games, Phaser 4 and Godot 4.7, with an AI playtest loop and 13 prompts · How to replace SaaS subscriptions with vibe-coded tools · How to use AI agents for errands, calls and shopping · How to use Cursor agents and automations · How to make 3D scenes and models with AI and Blender (Blender MCP, Claude, Codex): step-by-step · How to use Claude Code skills and plugins · How to cut Claude Code, Codex and Cursor costs: commands, settings and prompts that save tokens (Nov 2026) · How to automate a small business with AI agents · How to compare AI models on the same prompt · How to build hardware projects with AI agents · How to make an AI music video for your song (Suno, Grok Imagine, Kling, Veo) · How to use AI agents with Obsidian notes (CLI, Claude Code, MCP) · How to build apps and games for your kids with AI · How to use ChatGPT for real projects and everyday tasks · How to make AI agents ask for approval before they act · How to build AI trading and investing agents (Alpaca MCP and a six-agent Grok Bot desk) · How to build AI agents that make and answer phone calls · How to plan meals and groceries with AI (weekly plan, shopping list, Instacart cart in ChatGPT, Claude or Gemini) · How to use AI agents for fitness and health · How to undo, checkpoint and stop runaway coding agents · How to use AI agents for job hunting · How to automate social media posts with AI agents · How to build a smart home and voice assistant with AI agents · How to make money with AI agents: 4 setups real people get paid for (local websites, affiliate sites, digital products, freelance gigs) · How to build a website with AI agents · How to use AI agents for research: literature reviews, citations and papers (Claude, Zotero, Elicit) · How to build an iPhone or Android app with AI · How to automate email and your inbox with AI agents · How to use AI agents on Linux servers and homelabs safely (Claude Code, Codex, SSH, Proxmox) · How to build Telegram, Discord and WhatsApp bots with AI · How to research memecoins and crypto with AI agents (read-only first, 2026) · How to remove ads and bloatware from your smart TV with AI (Android TV, Google TV, Samsung, LG) · How to scan and organize receipts and paperwork with AI (ChatGPT, Paperless-ngx) · How to organize and search your photo library with AI (Immich, Google Photos, Videre) · How to check a medical bill for errors and appeal an insurance denial with AI · How to set up local AI security cameras with Frigate, Ollama and Home Assistant (no cloud) · How to set up a Jellyfin media server with AI help (free Plex alternative): Docker, hardware transcoding, remote access · How to lower your electric bill with Home Assistant and AI: energy dashboard, smart plugs, time-of-use automations · How to self-host AI agents at home on a Raspberry Pi, Mac mini or old PC · How to find and cancel subscriptions you forgot about with AI · How to run a private ChatGPT at home on your own computer (Ollama + Open WebUI) · How to build and install your own app on a Samsung TV with AI · How to fix a printer that won't print with AI · How to learn anything with an AI tutor: ChatGPT Study mode, Gemini Guided Learning, NotebookLM flashcards and Anki (2026) · How to build an AI second brain (Karpathy-style LLM wiki) with Obsidian and Claude Code: setup, prompts and costs · How to reverse-engineer and revive old devices with AI · How to edit videos with Claude Code and Codex: cut footage with ffmpeg, Whisper and auto-editor, find scenes and bad frames, drive DaVinci Resolve over MCP (2026) · How to set up an AI family assistant · How to make a Godot or Unity game with AI: Godot AI, Unity CLI and MCP setups for Claude Code and Codex · How to build a custom Android TV or Google TV launcher with AI (manifest, adb commands, HDMI inputs and prompts) · How to use Claude Code and Codex together (Codex plugin, shared AGENTS.md, worktrees, auto cross-review and GitHub Actions) · How to build your own invoicing and bookkeeping app with AI · How to make a browser arcade game with AI (Claude Code, Codex, three.js, 2026) · How to make a product demo or launch video with AI (Claude Code, Remotion, HyperFrames and Playwright) · How to fix Wi-Fi and secure your home network with AI (Nmap, Pi-hole, NextDNS, UniFi) · How to control Claude Code and Codex by voice (built-in /voice, local Whisper and hands-free setups) · How to design a PCB and electronics with AI · How to save, share and resume coding agent sessions · How to run AI coding agents in a sandbox · How to make a multiplayer game with AI · How to let AI control your computer: Claude, Codex, Windows-MCP and Playwright setups with prompts · How to build a Mac menu bar app with AI · How to port code to another language with AI (Claude Code or Codex, golden tests, C to Rust) · How to make an AI animated short film or anime (Seedance, Kling, Grok Imagine, Claude Code) · How to build your own coding agent or harness (Claude Agent SDK, a 60-line loop, Pi, mini-swe-agent and Terminal-Bench) · How to get notified when Claude Code or Codex needs you · How to build a Chrome extension with AI (Claude Code, Codex or Cursor, tested Manifest V3 code) · How to use AI agents with Excel and Google Sheets · How to run Claude Code and Codex in a desktop app (T3 Code, Codex app, Claude Desktop) · How to make a song or album with AI · How to vibe code classroom apps and quizzes as a teacher · How to plan and book a trip with an AI agent · How to make motion graphics and animated videos with Claude Code or Codex (Remotion, HyperFrames, Manim, 2026) · How to mod and reverse engineer games with AI · How to run AI agents overnight while you sleep · How to negotiate bills and get refunds with an AI agent · How to let an AI agent use your phone: Grok Bot phone tools, Android over ADB, iPhone Mirroring and a safe emulator test run, with prompts · How to build a Polymarket bot with AI (and Kalshi): step-by-step with the official SDKs · How to use Claude Duet: setup, connectors, standing instructions, prompts and real examples (2026) · How to build private apps just for yourself with AI · How to design and 3D print things with AI · How to automate customer support with AI agents: real setups · How to find leads and automate sales outreach with AI agents · How to run a Shopify or online store with AI agents · How to launch an app and get your first users with AI · How to build a team of AI agents with a chief of staff · How to make a hand-tracking or gesture-controlled game with AI · How to test your app with AI agents (Playwright MCP, Claude Code, Codex, 2026) · How to give an AI agent a budget or a card safely · How to share passwords and logins with an AI agent safely · How to get AI code review on your pull requests (Claude Code, Codex, Copilot, CodeRabbit and open-source PR-Agent) · How to review contracts, leases and fine print with AI · How to make slides and presentations with AI · How to take meeting notes and track follow-ups with AI · How to scrape websites and extract data with AI agents · How to make a podcast with AI: two-host episodes, cloned voices, clean audio, transcripts and clips · How to use AI agents for security scans and threat intel · How to build a dashboard with AI (Claude Code, Streamlit, Grok Bot Pages and Metabase) · How to clone your voice and make AI voiceovers · How to make AI images, thumbnails and product photos · How to write a CLAUDE.md or AGENTS.md file: one rules file for Claude Code, Codex, Cursor, Copilot and Gemini, with templates · How to build an AI chatbot for your own documents · How to port or remake a classic game with AI · How to build a VST plugin or synth with AI (Claude Code, Codex, JUCE): step-by-step · How to trigger AI agents with webhooks and events · How to find a home or rental with AI (Zillow, Redfin and Apartments.com in ChatGPT and Claude) · How to track Claude Code and Codex usage limits · How to build a daily AI briefing or news digest · How to check if your devices are spying on you with AI (Nmap, Pi-hole, TV ACR) · How to track smart-money wallets and copy trade with AI: Polymarket leaderboard, Solana and Ethereum wallet alerts and convergence rules · How to translate and localize your app or content with AI (i18next, Claude Code, DeepL and fastlane) · How to write and publish a book with AI: editing setup, KDP rules, EPUB commands and prompts · How to control your TV with an AI agent (ADB, Roku ECP, Samsung/LG, Home Assistant) · How to take your robot vacuum off the cloud with AI (Valetudo, Matter, Home Assistant) · How to connect an AI agent to Home Assistant (Claude, ChatGPT, Claude Code, Codex, 2026) · How to let an AI agent do your bookkeeping (Xero, QuickBooks, MCP) · How to run an AI agent 24/7 on an old Android phone or TV box (Termux, 2026) · How to see all your bank accounts in one place with AI