Documentation / Agents

acbridge (CLI)

The same MCP surface through a CLI over a Unix socket, available on every card's PATH — the path when the provider does not expose the catalog.

acbridge is the second door to the same house as MCP. It talks over a Unix socket and is on every card’s PATH. Choose between the two by availability, not by taste.

When to use it

Not every provider exposes the MCP catalog to the agent. The app’s answer is one of four: the agent receives the declared tools; there is no catalog and the CLI hint arrives through the scrollback; neither; or it does not apply to a plain shell. The text that works in the briefing is:

Report with the report tool if it is in your catalog; otherwise acbridge report '<json>' — same payload, same record.

Usage

Running acbridge with no arguments prints the full usage. The commands cover the same ground as MCP: list cards, read a card, send text, open a URL, take a snapshot, query and update tasks, and report. Heavy command under the gate lock: acbridge gate-lock [--scope repo|machine] -- <command> (mirror of run_locked). The living list is the one in MCP tools — the two doors call the same backend.

One protocol detail worth knowing: every request carries a protocol integer. An acbridge older or newer than the app is refused — identity and fields must match the running bus; a mismatch would drop data in silence. If the package’s binary is behind the repo, the response says so instead of accepting and losing data.

The Cline limitation, declared

A cline card does not bring up its own process: it attaches to a shared daemon. The card’s identity lives in the process environment, and the daemon freezes the environment on the first card — so all cline cards inherit the same AGENT_CANVAS_CARD_ID (measured: five cards, environments byte for byte identical, empty diff).

This is not fixable on Stellar’s side: the process is one, and rewriting the environment per card would have the last writer winning. What the app does is not let the defect be silent. The report door requires the declared card to exist, and the inherited id usually points at a card that has already been closed — so the report is refused, naming the id and promising what is now true: nothing was written. Before this check the report went to the database under a ghost id and the author received ok.

The channel that works from a cline card is send_to_card to the orchestrator: the delivery does not go through identity, only the record does. The card itself has the right id; what does not is the MCP shim, created by the daemon. See Reports and signals.

Environment variables

Every card is born with the context it needs to talk to the app:

Variable What for
AGENT_CANVAS_CARD_ID your identity on the board
AGENT_CANVAS_TASK_ID the task you were born to do
AGENT_CANVAS_MCP_URL the MCP HTTP endpoint
AGENT_CANVAS_SOCK the acbridge socket
AGENT_CANVAS_CWD the working directory
AGENT_CANVAS_SPAWN_DEPTH your depth in the chain

One detail that confuses

The channel a report came in through — socket (CLI) or http (MCP) — is stamped by the server, never declared by the agent. A field the agent declares is a field the agent can get wrong. See Reports and signals.