Feature request: repo-level memory so AI agents keep context across sessions and tools #212396
Replies: 7 comments 20 replies
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
What has worked for me on the "agent undoes a fix from two days ago" problem is to keep the reason next to the code, not only in a session brief.
That covers one repo. The part that does not fit in a repo is what follows you across repos and chats: your own rules, preferences and work history. I built Cloud Alter Ego for that layer. It is a remote MCP connector that serves those as plain Markdown files from your own cloud storage, so Claude.ai, ChatGPT and agents can all read the same files. It does not replace a per-repo handoff. Docs: https://cloudalterego.cafeboon.com/docs.html |
|
Part of this already exists, but each vendor keeps its own. Copilot Memory stores repository-level facts with citations to the code behind them. When a fact looks relevant, Copilot checks those citations against the current branch. Facts expire after 90 days without reinforcement by default, and people with write access can review and delete them in the repo settings. It's shared across Copilot's cloud agent, CLI and code review, but other agents can't read it (docs). Claude Code's auto memory is per repo too, but it lives on your machine under So the ask could be narrower than a new feature: expose Copilot Memory's repository facts, with the same citations and expiry, through the GitHub API or MCP server, so any agent can read and write the same store. What works for me today without extra tooling:
On the real-time question above: a file in the repo only syncs on push and pull, so it can't be sub-second. A PR or issue is visible to every tool on its next read, with no sync layer to run. None of these push changes into a session that's already running, though, so the agent has to re-read. |
|
Copilot Memory covers the Copilot side, as mentioned above. For Claude Code and Codex I built Dawnmere: one memory on your Mac that both read through their prompt hooks, so "remember that staging runs on 8443" said in one comes back in the other when you ask in similar words. Copilot in VS Code only gets it as plain MCP tools, and it's an early beta, Apple silicon Macs only. For the "agent undid my fix" case I'd still put the reason in the commit message. https://dawnmere.app/?src=gh-reply |
|
The split SebastiaanBoon describes, a short rewritten handoff for session state and a separate log for decisions, is the part I'd keep. One refinement on the decision log: if it stays append-only, a reversed decision and its replacement both remain in the file, and an agent reading it can pick up the old reason and act on it, which is the same "undid my fix" failure from the other direction. Giving each decision its own record with a status (proposed, accepted, superseded) and a I maintain Data Olympus, an open-source MCP server that works this way over plain markdown files in git. Its consult tool returns only records currently in force, and for Claude Code and Codex an optional hook injects those governing decisions into each turn, so the agent sees the current reason without being asked. The session handoff itself still works well as the short file described above. |
|
Agreeing with the split in the replies above: state gets overwritten each session, decisions get appended with the "why". Mixing them is what makes CLAUDE.md-style files balloon. The part that helps most is retrieving only what's relevant to the current task instead of loading the whole file every session. Full disclosure, I work on Alexein. It's a memory shared across AI tools over hosted MCP (Claude, ChatGPT, Cursor, Codex, VS Code/Copilot), so something saved in one tool can be recalled in the others: https://alexein.ai/mcp It's a personal memory, not a repo-scoped handoff, so it doesn't give you the repo-visible, owner-editable record you're asking GitHub for. For the "agent reverted my fix" case I'd still record the reason in the commit message too. |
|
This is a really useful idea! One of the biggest challenges with AI coding agents is maintaining context across sessions. A structured handoff with previous changes, decisions, and pending tasks could save a lot of time and help prevent agents from undoing previous work. Having this built directly into GitHub would make it even more powerful, especially for developers working on long-term projects. I’d love to see this feature become a reality! |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
The problem
When I work on a repo with AI agents (Copilot, Claude Code, Codex), every new session starts from zero. The agent doesn't know:
So I re-explain the project every morning, and agents sometimes undo a fix from two days ago because they don't know why it was made.
copilot-instructions.md / CLAUDE.md help, but they have to be updated by hand, they keep growing, and they don't capture session-level state.
What I'd like GitHub to consider
A small, structured "handoff" stored per repository that any agent can read and write:
Since GitHub already sits between all these agents, the repo is the natural place for this memory to live.
What I do today
I built an open-source workaround for myself, CogniCore (Apache 2.0): https://github.com/cognicore-dev/cognicore-env. It uses Claude Code / Codex hooks to save a short handoff after each session and exposes it over MCP, so Claude.ai, ChatGPT and Cursor can read it too. It works, but native support in GitHub would be far better for everyone.
Questions for others
How do you keep context between agent sessions on the same repo? Notes file, issues, something else?
All reactions