logoalt Hacker News

Show HN: Ctx – a /resume that works across Claude Code and Codex

49 pointsby dchu17yesterday at 4:35 PM20 commentsview on HN

ctx is a local SQLite-backed skill for Claude Code and Codex that stores context as a persistent workstream that can be continued across agent sessions. Each workstream can contain multiple sessions, notes, decisions, todos, and resume packs. It essentially functions as a /resume that can work across coding agents.

Here is a video of how it works: https://www.loom.com/share/5e558204885e4264a34d2cf6bd488117

I initially built ctx because I wanted to try a workstream that I started on Claude and continue it from Codex. Since then, I’ve added a few quality of life improvements, including the ability to search across previous workstreams, manually delete parts of the context with, and branch off existing workstreams.. I’ve started using ctx instead of the native ‘/resume’ in Claude/Codex because I often have a lot of sessions going at once, and with the lists that these apps currently give, it’s not always obvious which one is the right one to pick back up. ctx gives me a much clearer way to organize and return to the sessions that actually matter.

It’s simple to install after you clone the repo with one line: ./setup.sh, which adds the skill to both Claude Code and Codex. After that, you should be able to directly use ctx in your agent as a skill with ‘/ctx [command]’ in Claude and ‘ctx [command]’ in Codex.

A few things it does:

- Resume an existing workstream from either tool

- Pull existing context into a new workstream

- Keep stable transcript binding, so once a workstream is linked to a Claude or Codex conversation, it keeps following that exact session instead of drifting to whichever transcript file is newest

- Search for relevant workstreams

- Branch from existing context to explore different tasks in parallel

It’s intentionally local-first: SQLite, no API keys, and no hosted backend. I built it mainly for myself, but thought it would be cool to share with the HN community.


Comments

LeoPantheratoday at 8:44 PM

I don't think I've ever /resumed a Claude Code session even once. What do people use that for? The way I use it is to make a change, maybe document the change, and then I'm done. New session.

show 2 replies
ghm2180today at 7:59 PM

Interesting. What kind of context usage does it have when switching between the two providers? Like is it smart about using the # tokens when you go from claude -> codex or vice versa for a conversation?

How does ctx "normalize" things across providers in the context window ( e.g. tool/mcp calls, sub-agent results)?

giancarlostorotoday at 6:36 PM

Tooling like this is why I really want to build my own harness that can replace Claude Code, because I have been building a few different custom tools that would be nice as part of one single harness so I don't have to tweak configurations across all my different environments, projects and even OS' it gets tiresome, and Claude even has separate "memories" on different devices, making the experience even more inconsistent.

show 3 replies
burembatoday at 4:57 PM

Since prompt caching won't work across different models, how is this approach better than dropping a PR for the other harnesses to review?

show 2 replies
t0mas88today at 4:59 PM

Have you considered making it possible to share a stream/context? As an export/import function.

show 2 replies
phoenixrangertoday at 7:47 PM

really interesting idea! will check it out. and thanks for making it local-first!

tuo-leitoday at 6:03 PM

[dead]