-
Notifications
You must be signed in to change notification settings - Fork 0
Runbook: Project Management
Common operational tasks: adding a project, linking projects, unlinking, rotating tokens, and troubleshooting.
- In Dispatch, click the + button on the Projects rail.
- A native file picker (
NSOpenPanel) opens. Navigate to a git repository folder and click Open. - Dispatch creates a project record with:
- A user-visible name (editable, defaults to the folder name)
- The repo path (immutable after creation)
- A durable 128-bit bus token (minted at link time, stored in
GlobalDatabase)
- Dispatch merges the
dispatchentry into that repo's.mcp.json:If the repo had no{ "mcpServers": { "dispatch": { "type": "http", "url": "http://127.0.0.1:<port>/bus/<token>" } } }.mcp.json, Dispatch creates one and adds a marked line to.gitignoreso the token is never committed. - The project card appears in the rail, shows real git status, and is ready to be linked to other projects.
What gets written: Only the dispatch key under mcpServers; all other servers and top-level keys are untouched (value-faithful merge).
- Open the second project's card in the rail (click it, or right-click and Edit).
- Scroll to the "Cross-project links" section.
- Click "+ Link a project…" and choose the first project from the dropdown.
- Dispatch creates a
projectLinkrow inGlobalDatabase.
Result: list_projects in the second project now reports that it can reach the first one. ask_agent calls between them are no longer refused.
Bidirectionality: Linking is one-way at the MCP level. If you want two projects to ask each other, link both directions (A→B and B→A).
- Open the project's card and click Edit.
- In the "Cross-project links" section, find the link you want to remove and click the X button.
- Dispatch deletes the
projectLinkrow.
Result: ask_agent calls from one project to the other are refused with "not linked". Any pending questions between them remain in the database until they expire (1 week).
- Right-click the project card on the rail and select Delete (or open Edit and click the red Delete button at the bottom).
- Dispatch:
- Removes the project record from
GlobalDatabase - Rotates the bus token (revokes the old route on
MCPBusListener) - Removes the
dispatchkey from that repo's.mcp.json(value-faithful merge) - Deletes the
.mcp.jsonfile only if Dispatch created it (pre-existing files are left with their shell{"mcpServers": {}}intact)
- Removes the project record from
- That repo's Claude Code session can no longer reach the bus; its next
initializecall reports "dispatch server not found".
- Open the project's card and click Edit.
- Change the Name field at the top.
- Click Save.
The user-visible name is updated in the rail and in list_projects output. The repo path and bus token are unchanged.
To invalidate old .mcp.json files without changing the repo:
- Delete the project (see "Removing a Project" above).
- Re-link the same repo.
A new token is minted, a new entry is written to .mcp.json, and the old route is immediately dead on MCPBusListener. Any client holding an old .mcp.json fails with 404 on the next request.
Symptom: A Claude Code session in a linked repo reports "dispatch server is not available", "404", or "connection refused".
Diagnosis:
- Check that the project is still linked in Dispatch (it appears in the Projects rail).
- Check the Bus Health footer in Dispatch (click the footer to open the popover). It shows whether the listener is up and on which port.
- Check that the repo's
.mcp.jsonstill contains thedispatchentry — verify withcat <repo>/.mcp.json | grep dispatch.
Likely causes and fixes:
-
The project was deleted. Dispatch removed the
dispatchentry from.mcp.json. Fix: Re-link the repo in Dispatch. -
The token was rotated. The
.mcp.jsonon disk has a stale token (e.g., the session is using an old copy of the file). Fix: Restart the Claude Code session to re-read.mcp.jsonfrom disk, or re-link the project. -
The Dispatch app crashed and restarted on a different port. The listener picked a new port, but old
.mcp.jsonfiles still point at the old one. Fix: Restart the Claude Code session, or re-link the project (Dispatch will rewrite.mcp.jsonwith the current port). -
Firewall or network issue. The session cannot reach
127.0.0.1:<port>. Fix: Check firewall rules, verify the port in Dispatch's Bus Health footer, and ensure the session's process can bind to loopback.
Symptom: ask_agent returns {status: "pending"}, the question sits in the target's inbox, but answer_agent calls fail or timeout, or the answer never arrives at the asking session.
Likely causes:
-
The target session never called
check_messages. The other session doesn't know there's a question waiting. It might be idle or running a different task. Fix: Wait for it to callcheck_messages, or answer from Dispatch's Messages tab (open the question card and click Answer). -
The answer already arrived but was marked seen. Outcomes are reported exactly once per session. If the asking session already received and displayed the outcome, a second
check_messageswon't report it again. Fix: Check Dispatch's Messages tab — the answer is there. - The question expired. Messages expire 1 week after creation. A very old pending question is no longer in the inbox. Fix: Ask again.
- The link was deleted. If the inter-project link was removed, pending messages are orphaned. Fix: Re-link the projects and ask again.
Symptom: Bus traffic is happening (you see errors or confirmations in the Claude sessions), but Dispatch's Messages tab is empty or incomplete.
Likely causes:
- No linked projects. If there are fewer than two linked projects, there's nobody to ask. Fix: Link two or more projects.
- Old questions expired. Questions are cleaned up 1 week after creation. Fix: Make a fresh ask to populate the inbox.
-
Database corruption or disk issue.
GlobalDatabasecannot read or write. Fix: Check system logs, verify disk space, and restart the app.
Last updated: 2026-07-30 — new
Getting Started
Architecture
- Persistence: Database Schema and Records
- Services and Actors
Reference
- Getting Started
- How Dispatch Works
- Linking Projects
- The Four Verbs
- Architecture Overview
- Product Specification
- Technical Specification
- Wiki Maintenance
- Testing and Mocks
Runbooks
- Runbook: Project Management