ctxpool
v0.1.1
Published
Local-first handoff packets for AI coding agents.
Readme
ContextPool
ContextPool is a local-first context builder for AI-assisted engineering work.
It captures handoff packets from Codex and Claude sessions, preserves repo state and provenance, then lets you drag reusable context blocks into agent-ready prompt packs for Codex, Claude, Cursor, or any MCP-capable tool.
Why
AI coding sessions often lose the useful parts of prior work: task intent, decisions, constraints, files changed, verification state, blockers, and the next best action. ContextPool keeps that engineering memory local, structured, and reusable.
The wedge is not generic long-term memory. It is provenance-backed engineering continuity:
- Capture what changed, why it changed, what was verified, what failed, and what should happen next.
- Preserve local-first trust by default.
- Let users curate exactly which context goes into the next agent prompt.
- Export sync-ready packets only when the user chooses.
Features
- Local handoff capture from Codex and Claude JSONL sessions.
- Git snapshot capture: branch, commit, dirty files, diff stats, patches, and recent commits.
- Drag-and-drop context pack builder UI.
- Reusable context blocks for intent, instructions, decisions, constraints, verification, risks, next actions, files, and transcript snippets.
- Markdown and JSON prompt-pack export.
- Local SQL.js storage under
~/.ctxpoolby default. - MCP tools for agents to read handoffs and curated context packs.
- Redacted team timeline export with raw transcripts excluded by default.
Install
Requires Node.js >=22.5.0.
npm install -g ctxpool
ctxpool initFor one-off usage without a global install:
npx ctxpool --helpQuick Start
Capture a handoff from the current workspace:
ctxpool handoff --from codex --no-ollamaOpen the local context builder UI:
ctxpool uiThen open:
http://127.0.0.1:4377If the default port is busy, ctxpool ui tries the next few ports automatically unless a fixed --port is provided.
Context Packs
The UI turns saved handoffs into draggable context blocks. Add the useful blocks to a context pack, reorder them, disable noisy entries, and copy the generated markdown or JSON into another agent.
Raw transcript text is redacted by default in context packs. Enable raw transcript export only when the destination is trusted.
Saved packs stay local in the ContextPool store.
CLI
ctxpool init
ctxpool handoff --from codex --no-ollama
ctxpool capture --from claude --task billing-flow
ctxpool ui
ctxpool tasks
ctxpool show latest --task billing-flow
ctxpool team export --task billing-flow
ctxpool mcp startctxpool team export writes a sync-ready JSON packet under the local ContextPool home directory. Raw transcript entries are excluded by default:
ctxpool team export --task my-task
ctxpool team export --task my-task --include-transcriptMCP Tools
ContextPool exposes local MCP tools for agents:
get_latest_handoffget_handoff_by_tasklist_tasksget_task_statusget_latest_agent_contextget_handoff_filesget_team_timeline_packetlist_context_packsget_context_pack
get_team_timeline_packet returns a sync-ready packet with raw transcripts excluded unless explicitly requested. get_context_pack returns a curated prompt pack as markdown by default or JSON when requested.
Privacy and Security
- ContextPool is local-first. It stores data under
~/.ctxpoolunlessCTXPOOL_HOMEis set. - Handoff packets can include repo paths, diffs, transcript excerpts, and command output. Review exports before sharing.
- Raw transcripts are excluded from team exports by default.
- Context pack transcript blocks are redacted by default.
- The UI binds to
127.0.0.1by default. Avoid binding to public interfaces unless you understand the local-file exposure risk. - File preview/open APIs are restricted to repositories already captured in saved handoffs.
Security issues should be reported privately; see SECURITY.md.
Development
npm install
npm run typecheck
npm test
npm run buildWhen working from source, run CLI commands through the development entrypoint:
CTXPOOL_HOME=.ctxpool-test npm run dev -- ui
npm run dev -- --versionRelease Checks
Before publishing:
npm test
npm run typecheck
npm run build
npm audit --omit=dev
npm pack --dry-runConfirm the package contents include only intentional release files and no local stores, databases, logs, transcripts, or secrets.
License
MIT
