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.- macOS
- Linux
- Windows
The script uses 1. Save this as Make it runnable:2. Store your credential in 3. Register the hook in
curl (already on macOS) and jq, a small JSON tool. Install jq once:.claude/hooks/cortex-capture.sh:.claude/settings.local.json (kept out of shared files):.claude/settings.json:~/.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 tohttps://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.