Show HN: Ctx – a /resume that works across Claude Code and Codex
by dchu17 on 4/20/2026, 4:35:05 PM
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.<p>Here is a video of how it works: <a href="https://www.loom.com/share/5e558204885e4264a34d2cf6bd488117" rel="nofollow">https://www.loom.com/share/5e558204885e4264a34d2cf6bd488117</a><p>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.<p>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.<p>A few things it does:<p>- Resume an existing workstream from either tool<p>- Pull existing context into a new workstream<p>- 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<p>- Search for relevant workstreams<p>- Branch from existing context to explore different tasks in parallel<p>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.
https://github.com/dchu917/ctx
Comments
by: ghm2180
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?<p>How does ctx "normalize" things across providers in the context window ( e.g. tool/mcp calls, sub-agent results)?
4/21/2026, 7:59:53 PM
by: giancarlostoro
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.
4/21/2026, 6:36:52 PM
by: buremba
Since prompt caching won't work across different models, how is this approach better than dropping a PR for the other harnesses to review?
4/21/2026, 4:57:12 PM
by: t0mas88
Have you considered making it possible to share a stream/context? As an export/import function.
4/21/2026, 4:59:07 PM
by: phoenixranger
really interesting idea! will check it out. and thanks for making it local-first!
4/21/2026, 7:47:39 PM
by: tuo-lei
[dead]
4/21/2026, 6:03:27 PM