Skip to main content
The conversations you have with your AI agents are full of knowledge: decisions, reasoning, things you worked out together. There are two ways to keep them in your brain, an easy one that works today, and an automatic one for when you want it to happen without thinking.

The easy way: just ask

At the end of a conversation, tell your connected agent to save it:
“Save a summary of what we worked out to my brain.”
The agent writes a tidy page into your brain, following the ingest skill, the same as any other thing you ask it to save. No setup, nothing to install. This is all most people need. It lands in your own work brain, so anything captured this way stays yours until you decide to promote it.

The automatic way: a session hook (advanced)

If you would rather have every session captured without asking each time, Claude Code can do it for you with a hook: a small command it runs automatically when a session ends. Setting this up means creating a short script and editing a settings file, so it is a step up in effort. If you are comfortable with a terminal it takes a few minutes; if not, it is a good one to hand to a developer, or just use the easy way above. First, the one step that is the same on every system:
1

Create a service credential

In your work brain’s service credentials, create a read-and-write credential labelled “claude-code-capture” and copy its ck_ key. This lets the hook post to Cortex without a browser.
Then follow the tab for your operating system. Each one creates a small script, stores your credential, and registers the hook.
The script uses curl (already on macOS) and jq, a small JSON tool. Install jq once:
1. Save this as .claude/hooks/cortex-capture.sh:
Make it runnable:
2. Store your credential in .claude/settings.local.json (kept out of shared files):
3. Register the hook in .claude/settings.json:
To capture sessions across every project rather than just the current one, put the same hook in your user-level ~/.claude/settings.json and use the script’s full path. From then on, each session’s transcript lands in your personal inbox through the same door as any other item. What happens next is different from a document you chose to upload. A cheap first pass decides whether the session is worth a closer look at all; if not, it waits in the review queue with the reason. If it is, the conversation skill reads it with a high bar: only a real decision, an idea in your own words, a durable fact about someone or something your brain tracks, or a substantial piece of work gets filed. Most sessions produce nothing, and that is the intended result. The transcript stays on the archived item either way, so nothing is lost. Ask your next session “what did we work on last time?” and it can tell you.

Other agents

Any tool that can run a command or call a web address when it finishes can capture the same way: post the conversation to https://api.oncortex.ai/api/v1/inbox with a service credential. The default-inbox address means you never name a brain; it goes to the credential’s brain.

Keeping it tidy

Captured conversations are filed by the conversation skill, which pulls out the substance rather than dumping raw transcripts, and files nothing when a session held nothing durable. If two sessions capture the same thing, duplicate handling stops your brain filling up with repeats.