Show HN: Ctx – a /resume that works across Claude Code and Codex
TL;DR Highlight
ctx builds a local CLI tool capable of maintaining and branching conversational context between Claude Code and OpenAI Codex, benefiting developers who want seamless AI coding sessions.
Who Should Read
Developers experiencing lost context when switching between Claude Code and Codex, or when sessions are interrupted during their workflow.
Core Mechanics
- ctx manages Claude Code and OpenAI Codex conversations by grouping them into 'workstreams', binding each to both a Claude conversation ID and a Codex conversation ID.
- The Exact transcript binding feature ensures that when a workstream is reloaded, it retrieves the precise conversation history associated with that session, preventing 'transcript drift'.
- Safe branching allows developers to duplicate the current workstream state into a new branch, creating a completely isolated conversation stream.
- Stored workstreams, sessions, and entries are indexed in a SQLite DB for fast searching and visual inspection via a local browser frontend.
- The pin feature permanently includes specific entries in the context, while the exclude feature hides them from the model without removing them from search results; unwanted items can also be fully deleted.
- ctx is designed to be completely local-first, requiring no API keys or external services; data is stored in a standard SQLite file and local files.
- Installation is completed with a single command: `git clone` followed by `./setup.sh`, which creates a local project DB, installs the ctx shim in `~/.contextfun/bin`, and creates symbolic links to the skills directories for Claude and Codex.
- Inspired by Claude Code's `/resume` command, ctx differentiates itself by integrating similar functionality across both AI coding tools.
Evidence
- "One commenter stated they've never used a `/resume` function, suggesting that starting a new session is preferable to resuming if changes are made and documented, questioning the universality of the need for 'long-running context maintenance' that ctx addresses."
How to Apply
- When switching between Claude Code and OpenAI Codex, create a workstream with ctx to maintain the same working context, starting with a simple `git clone` and `./setup.sh`.
- When experimenting with a long-term AI coding project, use ctx's branching feature to safely explore new directions while preserving the original workstream.
- For architectural decisions or design documents frequently referenced across AI sessions, pin those entries in ctx to ensure they are always included in the context.
- If handing off an AI coding session to a teammate, consider sharing the SQLite DB file or waiting for the implementation of an export/import feature to transfer the workstream.
Code Example
# Installation
git clone https://github.com/dchu917/ctx.git
cd ctx
./setup.sh
# setup.sh does the following:
# - Creates ./.contextfun/context.db
# - Writes ./ctx.env
# - Installs repo-based ctx shim in ~/.contextfun/bin
# - Creates local skills links in ~/.claude/skills and ~/.codex/skills
# Usage example (based on README)
# In Claude Code
/ctx save feature-audit
# In Codex
ctx resume feature-audit
# Create a branch
ctx branch feature-audit feature-audit-v2Terminology
Related Papers
Anthropic's open-source framework for AI-powered vulnerability discovery
Anthropic이 Claude를 활용해 코드 취약점을 자율적으로 탐지·트리아지·패치하는 오픈소스 레퍼런스 구현체를 공개했다. 실제 보안팀과의 협업 경험을 바탕으로 만들어진 파이프라인이라 실전 적용성이 높다.
Will the Agent Recuse Itself? Measuring LLM-Agent Compliance with In-Band Access-Deny Signals
서버가 SSH 배너나 DB NOTICE로 'AI 에이전트는 접근하지 마세요' 신호를 보내면 GPT-4o, Claude Code 같은 LLM 에이전트가 실제로 물러나는지 실험으로 측정했다.
ToolChoiceConfusion: Causal Minimal Tool Filtering for Reliable LLM Agents
LLM 에이전트에 도구를 100개 다 보여주지 말고, 지금 당장 필요한 것 1개만 보여주면 성공률은 그대로에 토큰은 90% 절약된다.
My Agent Skill for Test-Driven Development
AI 에이전트가 형편없는 테스트를 작성하는 문제를 해결하기 위해, Kent Beck의 Canon TDD 원칙을 'Skill'로 만들어 에이전트에게 주입하는 방법을 공유한다. 에이전트 코딩에서 테스트 품질을 높이고 싶은 개발자에게 실용적인 접근법을 제시한다.
Show HN: Paseo – Beautiful open-source coding agent interface
Claude Code, Codex, GitHub Copilot 등 여러 코딩 에이전트를 하나의 UI로 제어하는 오픈소스 프로젝트로, 로컬 데몬 방식으로 자기 머신에서 실행하면서 모바일에서도 접근할 수 있다.
AI Agents Enable Adaptive Computer Worms
단일 GPU에서 돌아가는 오픈소스 LLM만으로 네트워크를 자율 전파하는 AI 웜을 실제로 구현해서, 이게 이론이 아닌 현실임을 증명했다.