Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Equip a Coding Agent With Memory Across Sessions

Overview

Give Claude Code a lasting role and memory across sessions with a CLAUDE.md file, a decisions log and session summaries, add scheduled tasks for repeating work, and put a hook in front of actions that reach other people.

Problem or Objective

More in Coding and Code Review

AI Agents and Models

Tools and Integrations

Tools
Claude Code
Prerequisites
Claude Code with a Claude subscription or Anthropic Console account (most surfaces require one; the terminal CLI, VS Code and JetBrains also support third-party providers), and a project under version control.

How It Works

Create a CLAUDE.md file at the project root with the agent's role, the standing rules it must follow, and pointers to a memory folder; Claude Code reads it at the start of every session. In the memory folder keep three plain files: a decisions log, a list of ongoing work, and dated session summaries. End each session by asking Claude to append a short summary and update the work list, and review that edit before accepting it. Leave auto memory on so Claude also saves learnings on its own, and look through what it saved now and then. Move repeating jobs, such as a morning review of open pull requests, into scheduled tasks that only produce reports. Add a hook that runs before actions that push code, send messages or touch production; check the hooks documentation for whether and how a hook can stop such an action, and set it up so you approve those actions yourself in an interactive session.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Claude Code.
  2. Connect the toolsConnect the tools this workflow relies on: Claude Code.
  3. Check the prerequisitesClaude Code with a Claude subscription or Anthropic Console account (most surfaces require one; the terminal CLI, VS Code and JetBrains also support third-party providers), and a project under version control.
  4. Gather your detailsCollect what the prompt asks for: Agent's role, Standing rules, Memory folder, Actions that need your approval.
  5. Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.

Practical Starter Prompt: Set up lasting memory for this project

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
Set up memory for this project so future sessions pick up where we left off. Draft a CLAUDE.md that states your role as [Agent's role], these standing rules: [Standing rules], and points to a [Memory folder] folder. In that folder create a decisions log, an ongoing-work list and a session-summaries file. Propose a hook that stops any action that [Actions that need your approval] so I can approve it in an interactive session. Show me every file before writing it. From now on, at the end of each session, propose a short summary and work-list update for me to approve.

Approve each edit Claude proposes to CLAUDE.md and the memory folder, review what auto memory saves on its own, keep scheduled tasks to reports only, and approve guarded actions yourself in an interactive session.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Anthropic's Claude Code overview says CLAUDE.md is read at the start of every session, that auto memory saves learnings across sessions, that hooks run shell commands before or after Claude Code actions, and that recurring tasks can run on a schedule, including in the cloud. The overview does not say whether or how a hook can stop an action, so that part was not checked here.

Limitations and Considerations

Scheduled cloud tasks keep running when your computer is off, so give them no permission to send, push or change production on their own; check the hooks documentation for whether and how a hook can stop an action. Review what goes into CLAUDE.md and the memory files, since every session reads them and they can hold outdated or sensitive details. Keep secrets out of memory files. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

AI Agent Repository

Source code of the agent that does the work.

Related Videos

About anthropics/claude-code

About anthropics/claude-code

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. Overview - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC

    What this source supports
    • CLAUDE.md is a markdown file you add to your project root that Claude Code reads at the start of every session.
    • Claude also builds auto memory as it works, saving learnings across sessions without you writing anything.
    • Hooks let you run shell commands before or after Claude Code actions, like auto-formatting after every file edit or running lint before a commit.
    • Claude can run on a schedule to automate work that repeats; cloud scheduled tasks run in the cloud, so they keep running even when your computer is off.
  2. anthropics/claude-code README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC

    What this source supports
    • Agentic coding tool that runs in the terminal, reads a codebase and carries out coding tasks from natural language.
Report a problem

More with Claude Code

Planned, not done

Create Custom Store Tools Instead of Paying for Subscriptions

Use Claude Code to write small in-house tools for an online shop, such as a reply helper for support mail or a margin report, as an alternative to paying for separate apps, with testing before you rely on them.

code.claude.comanthropics/claude-code
Reported by source

Answer technical questions by letting async agents run experiments

Simon Willison sends research questions to cloud coding agents such as Claude Code for web and Codex Cloud, which write and run experiments in a dedicated repo and open a PR.

simonwillison.net · 6 Nov 2025anthropics/claude-code, openai/codex
Planned, not done

Structure Repeated Browser Research Into Evidence Tables

Give Claude Code the open-source Browser Use CLI with a local browser, ask the same research questions across a short list of pages, and keep every answer as a sourced table row.

github.comanthropics/claude-code, browser-use/browser-use

View all: Claude Code