Async cross-harness context management for agent sessions.
β’ Global Recall β’ Local Compact β’ Reviewable Context Jobs β’
δΈζζζ‘£ β’ Features β’ Quick Start β’ Commands β’ Safety Model β’ Design
Important
From harness-local memory to agent-native context recovery.
I noticed the problem around the Nth time I had to re-explain project context.
My machine has more than a dozen coding-agent entry points: Claude Code, Codex, CodeBuddy, Cursor, Trae, Code Desk, and a few internal company builds. They are all powerful, and many of them have their own memory systems. But every time I switch to a new harness, the same thing happens: I already discussed the task, explained the constraints, ruled out bad approaches, and hit the bugs somewhere else, yet the new window starts as if it knows nothing.
The problem is not just memory. It is cross-harness context recovery.
Harness-local memory is useful, but it does not answer the question: where did I already talk about this? Real agent work no longer lives in one agent, one window, or one project path. The context exists in local traces, but it is hard to recover when the next session starts.
So I built Agent Context Manager.
The premise is simple: if these conversations and tool traces are already stored locally, why can't an agent search them? ctx lets agents recall relevant fragments from past harness traces, compact them into a candidate context block, and let you review, apply, or discard the result.
Tip
I'm a human -> Continue reading this README for setup, commands, limits, and project context.
I'm an agent -> Read the slash-command skills in skills/ and the design notes in docs/design.md.
Agent Context Manager is a small set of slash-command skills and Python workers for asynchronous context management in local agent sessions. Its command namespace is ctx.
- For Claude Code and CodeBuddy: install
/ctx-recall,/ctx-compact, and/ctx-jobsas skills. - For Codex and other harnesses: run the backend directly through the Python CLI.
- For cross-harness recall: search local Claude Code, CodeBuddy, and Codex conversation logs from one session.
- For context safety: candidate context is not applied automatically; it goes through a job queue.
Status: 0.1-alpha
Not affiliated with Anthropic, OpenAI, CodeBuddy, Codex, or VCC. Use only on local logs and sessions you are authorized to access.
Tell your coding agent:
Install Agent Context Manager from https://github.com/OpenClaudex/agent-context-manager. Scan my home directory for local coding-agent conversation traces, register the discovered Claude Code / Codex / CodeBuddy / Cursor / Windsurf / Trae / Code Desk / Roo Code / Cline / Continue / Aider / Goose / OpenHands / Devin / Copilot Workspace / internal-agent history paths as recall sources, and set up cross-harness recall, async compact jobs, and reviewable context application.
After setup, use /ctx-recall, /ctx-compact, and /ctx-jobs from your agent session. Low-level implementation details live in the slash-command skills under skills/.
Agent Context Manager focuses on one workflow:
- Search many local coding-agent histories from one session.
- Compact current-session context into a candidate summary.
- Keep recall and compact results reviewable before they enter the active prompt.
- Let a coding agent add more local trace sources when it finds a new harness.
| Command | Scope | Expected Behavior |
|---|---|---|
/ctx-recall <query> |
Global, cross-harness | Search historical local logs and produce a candidate context block. |
/ctx-compact [instruction] |
Current session | Produce a candidate compact summary of the active session. |
/ctx-jobs |
Local job store | List jobs, preview results, apply completed results, or discard noise. |
/ctx-recall is meant to search any local coding-agent conversation trace you are authorized to inspect. This includes built-in support and agent-added sources for tools such as:
Claude Code, Codex, CodeBuddy, Cursor, Windsurf, Trae, Code Desk,
Roo Code, Cline, Continue, Aider, Goose, OpenHands, Devin,
Copilot Workspace, internal company builds, and other local harnesses.
If your agent does not find another harness, tell it what to add:
Add recall support for Cursor conversations stored under
~/Library/Application Support/Cursor/User/globalStorage/..., then make/ctx-recallinclude that source in cross-harness search.
The intended workflow is agent-native: name the missing coding agent or give the local trace path, and let your coding agent wire it into source discovery.
Context injection is high-risk, so ctx stays local and review-first: recall and compact results are candidates, jobs are stored under .ctx/jobs/, and nothing is applied to the active session until you explicitly accept it.
Most agent harnesses already persist rich traces. ctx makes those traces searchable across tools, then turns the result into a reviewable context operation:
recall old context -> compact current context -> review result -> apply deliberately
- Design Notes
- Agent Context Manager and VCC
- Claude Code installer
- CodeBuddy installer
- Skills:
ctx-recall,ctx-compact,ctx-jobs
- v0.1: async recall, async compact, jobs list/show/apply/discard.
- v0.2: cleaner CodeBuddy/Codex packaging and install flow.
- v0.3: source policy controls, privacy filters, and stronger stale detection.
- v0.4: pluggable recall backends beyond VCC.
Agent Context Manager is especially inspired by VCC, the View-oriented Conversation Compiler for agent trace analysis and conversation recovery. The core idea of compiling conversation traces into searchable context views, and several retrieval-oriented ideas in this project, are influenced by VCC.
The difference is that ctx is designed to sit above any single agent harness: it searches across local Claude Code, CodeBuddy, and Codex traces, runs recall and compact as asynchronous jobs, and keeps candidate context reviewable before anything enters the active session.
Thanks also to the broader context-management, conversation-recovery, and agent-memory projects that make it clearer why agent context should be searchable, inspectable, and portable across tools.
If this project helps your agent remember the right thing at the right time, please give it a β Star!
