Keep what Claude Code found from one session to the next
Every Claude Code session starts with a fresh context window. CLAUDE.md carries your fixed rules, but what Claude Code found, decided or tried during a session is gone unless it was saved somewhere. Contextingo’s Claude Code hook makes saving and reading part of every session.
Updated by Contextingo. Verified with Claude Code and Codex CLI.
Steps
How to set it up.
Install the connection and the hook
Run the setup command from Project → Connect. Besides the MCP server it installs a small hook in your own Claude folder (~/.claude/hooks/contextingo.mjs). Restart Claude Code once so it loads the hook.
npx contextingo init <code>A new session starts from the project
When a session starts, the hook asks Claude Code to load the Contextingo tools and read the project knowledge once, in brief, and to tell you what matters most for the work.
Saving happens while you work
Every prompt carries a short reminder to save new decisions, findings and failed attempts with context_upsert. At the end of a turn that changed files or committed without saving anything, the hook sends the turn back once with what is missing, and does the same for a save the server refused.
Nothing is lost when the chat is compacted
Right after Claude Code compacts a long chat, the hook asks it to save from the summary what would otherwise be lost, and to leave a checkpoint.
A resumed session picks up the changes
When you resume a session, the hook asks Claude Code to fetch only what changed since its last sync token, so corrections made by teammates in the meantime reach it.
After a commit, a handoff
When a turn commits, pushes or deploys without a checkpoint, the hook asks for session_checkpoint with a summary, next steps and open questions. It works without an issue or session_start.
Stop explaining your project to every new chat.
- Findings, decisions and failed attempts are saved while your AI works, not lost with the chat
- The next chat, teammate or tool starts from them, so nobody briefs anyone
- A person accepts the work, with the CI results already fetched
Free to start, no credit card. Pro and Team start with 14 days free.
Questions
Good to know.
Does Claude Code forget what happened before /compact?
Partly. After a compaction Claude Code reads the project-root CLAUDE.md again from disk, and nested CLAUDE.md files and path rules load again when they are needed. What was only said in the chat survives only as far as the summary keeps it (Claude Code memory documentation, October 2026). That is why the hook asks Claude Code, right after a compaction, to save from the summary the decisions, findings and failed attempts others need, and to leave a checkpoint.
How is this different from Claude Code’s auto memory?
Auto memory is notes Claude Code writes for itself on one machine. Contextingo keeps project records that every teammate’s AI reads, with a status, a source and a history, and a person can confirm them.
Does the hook send my code anywhere?
No. The hook is a local script with no key and no network access. It only adds instructions for Claude Code; Claude Code itself decides what to save over MCP.
How do I update the hook?
Run npx contextingo update. It replaces the installed hook with the current one; no setup code is needed.
More guides
- How to hand off work from Claude Code to CodexMove an issue from Claude Code to Codex CLI mid-task or when you hit a usage limit: a checkpoint, shared project knowledge and a person who accepts.
- How to hand off a Claude Code task to a teammateClaude Code keeps sessions on one computer. Save as you work, leave a checkpoint and assign the issue: your teammate’s AI starts with the context loaded.
- How to share project context across a Claude Code teamGive every teammate’s Claude Code the same requirements, decisions and findings, next to your GitHub issues, with a status per record.
- Connect Claude Code to GitHub issues over MCPLet Claude Code list, read and work on your GitHub issues over MCP, with acceptance criteria, linked pull requests, CI results and human review.
- Record failed attempts so no AI repeats themSave what an AI tried and why it failed as a record every teammate’s AI reads first, so Claude Code and Codex stop repeating the same dead end.
- Stop AI agents from marking their own work as doneCoding agents say “done” when tests failed or never ran. Contextingo fetches CI itself, shows it next to what the AI claimed, and only a person accepts.
- Connect Codex CLI to your project over MCPConnect OpenAI Codex CLI to a Contextingo project with one command or by hand, so it reads your team’s decisions and issues and hands off to Claude Code.
- How to keep AI notes current when the code changesNotes about your code go stale after a merge. How Contextingo flags a record when a merged pull request changes the file it cites, so no AI trusts it blindly.
- What to say to Claude Code or Codex in a Contextingo projectHand over, catch up, ask a teammate, set a reminder, find out why code is as it is: what to say in Claude Code or Codex and what happens next.
- How to hand over, park or take back work in Claude CodeHand a Claude Code or Codex task to a teammate with one sentence, park it for yourself, switch tools, or take a handover back before anyone picked it up.
- How to catch up and run a standup from a Claude Code chatSee what changed since your last session, where you stopped, what a teammate did yesterday and what is blocked, in one sentence from Claude Code or Codex.
- Ask a teammate, assign work or set a reminder in Claude CodeAsk a teammate a question or for a review, assign an issue or remind yourself on a date, all from Claude Code or Codex. Answers arrive in your next chat.
- Ask Claude Code why the code is the way it isUse what your team saved: why code is built this way, whether a note is still true, what a change would break and who knows the file.
- Contextingo vs CLAUDE.md, AGENTS.md and memory toolsWhen a file is enough, and when a team needs shared records.