DEV Community

shuo xiao
shuo xiao

Posted on

Coding agents keep losing context between tools, so I built a local-first handoff CLI

The problem

I often switch between Codex, OpenCode, Cline, Claude Desktop, scripts, and terminals.

The annoying part is not starting a new tool. The annoying part is explaining the same workspace state again:

  • what changed
  • what is still pending
  • what should not be touched
  • what tests passed
  • what the next agent should read before editing

What I built

AgentContextBus (acb) is a local-first CLI for handing off workspace context between coding agents.

It saves a local handoff packet, then lets the next agent read it through:

  • paste-ready prompts
  • brief prompts
  • a local dashboard
  • JSON output
  • explicit MCP tools

First run

npx @xiaoshuo1988/acb verify first-run
Enter fullscreen mode Exit fullscreen mode

For Chinese output:

npx @xiaoshuo1988/acb verify first-run --lang zh-CN
Enter fullscreen mode Exit fullscreen mode

A normal handoff

From the agent that has context:

acb handoff --from codex --summary "Ready for the next agent" --git
Enter fullscreen mode Exit fullscreen mode

From the receiving side:

acb receive --latest
Enter fullscreen mode Exit fullscreen mode

After the receiving agent summarizes the packet:

acb ack --latest --by opencode
Enter fullscreen mode Exit fullscreen mode

What ACB intentionally does not do

  • no hidden prompt injection
  • no traffic interception
  • no third-party client config mutation
  • no cloud sync
  • no background daemon

Why local-first

I want the user to be able to inspect the packet store, copy text manually, and decide exactly when context crosses from one agent to another.

What I want feedback on

  1. Is the handoff packet concept clear?
  2. Is verify first-run enough to understand the tool?
  3. Is receive --latest the right receiving-side command?
  4. Which client path needs the most work?
  5. Would you trust this workflow in a real project?

Repo:
https://github.com/xiaoshuo1988130/acb

Feedback discussion:
https://github.com/xiaoshuo1988130/acb/discussions/1

Top comments (0)