personal-cortex
A working setup for coding agents. A record that outlives the conversation, an instruction file that stays short, and guardrails that actually refuse. Organised by the failure each piece prevents, in three stages you can adopt one at a time.
What a session sees before you type a word
This is a real card, printed by a session-start hook in one of my own projects. Nothing in it was written for that session. Every line came from the record: the last session page, the task board, the newest decision, the newest trap.
That is the whole idea in one screen. The session does not reconstruct the project from you. It reads what the last session left behind, and it starts from there.
Why
Every session starts from zero. Rules get written and ignored. Procedures get forgotten. The reasoning behind a decision gets summarised away. Work does not resume; it gets reconstructed, by you, at the start of every conversation.
Each piece here is the fix for one of those failures, taken from a setup that has run for about a year across client programs and my own products. The reasoning behind every piece is in the Claude Code setup series; the files here are the transferable part.
The Cortex plugin: the same system, set up for you
If you do not want to copy files by hand, install the plugin. It works in the Claude desktop app's Code tab, in Claude Code, and in Codex, on a Mac.
claude plugin marketplace add thehimanshushukla/personal-cortex
claude plugin install cortex@personal-cortex
Using Codex instead? The same plugin installs in Codex:
codex plugin marketplace add thehimanshushukla/personal-cortex
codex plugin add cortex@personal-cortex
Your cortex keeps its instructions in AGENTS.md, which Codex, Cursor, Copilot and others read. CLAUDE.md and GEMINI.md are one-line pointers to it, and skills follow the open Agent Skills format. Cursor, Gemini CLI and Copilot adapters are next on the roadmap.
Then say "set up my cortex". A guided setup asks how you want your world organised (personal, work, each organisation you work with), explains each level as it goes, and builds an empty cortex in exactly that shape, backed up to your own private GitHub. Nothing is loaded that you did not choose. When it finishes, it walks you through everything you now have.
Where to start a session
Cortex runs on your own Mac. Start your sessions in one of these, and it is there by itself, in any folder:
- The Claude desktop app, Code tab (the </> icon at the top of the left sidebar), with a local session on your Mac, not a cloud environment. Claude Code needs a paid plan, so sign the app in with the account that has it.
- Claude Code in the terminal (
claude), or Codex on your Mac (the app or codex in the terminal).
It is not there in these:
- Claude on the web (claude.ai in a browser, including Code on the web). Those sessions run on Anthropic's servers and cannot reach your Mac. In a web session you get no start card and no reminder to log, and if you ask for your board Claude may build a look-alike page that is not your cortex. Work done there does not reach your notes.
- The Chat tab of the desktop app, unless you add the optional Chat tab extension, which shows your card when you ask and saves a chat. There is no automatic start card or reminder to log there.