Issue: MCP Agent Handoff System Disconnected
Agent handoff system queues offline when backend connection drops
Issue: MCP Agent Handoff System Disconnected
Summary
The MCP multi-agent handoff system fails to deliver handoffs when the agent connection to the backend is in a disconnected state. Handoffs are queued locally as "offline" entries but never sync to the backend, meaning the cowork agent and GoGrab AI extension never see them.
Symptoms
agent({ action: "status" })returnsconnected: false,connectionState: "disconnected"agent({ action: "identity" })showshasToken: false,tokenExpiring: trueagent({ action: "handoff_create" })returns success but with anoffline-*handoff ID- The GoGrab AI Chrome extension popup shows Handoffs: 0 even after creating handoffs
- The handoff message includes: "Handoff queued offline (API unavailable) - will sync when backend is reachable"
Root Cause (Investigation Needed)
The agent system's authentication token has expired (hasToken: false, tokenExpiring: true). The backends are running (backend-api on 3000, backend-ai on 3001) but the MCP agent cannot authenticate to establish a WebSocket or HTTP connection.
Potential causes:
- Token expiration -- JWT token used by the MCP agent has expired and auto-refresh is failing
- Backend endpoint unreachable -- The agent registration/auth endpoint may not be accessible from the MCP server process
- MCP server restart needed -- The MCP server process may need to be restarted to re-authenticate
Impact
- Cannot create handoffs from Cursor agents to cowork agents via MCP
- Must fall back to manual handoff creation through the GoGrab AI extension UI
- All
agent()MCP tool calls that require backend connectivity fail silently (queue offline)
Workaround
Create handoffs directly from the GoGrab AI Chrome extension panel, which has its own authenticated connection (as confirmed by the popup showing "AUTH: Paco Guijarro, NETWORK: Online").
Environment
- Agent ID:
gspace1-cursor-51a77b1e2647 - Platform: Cursor (gspace1 workspace)
- Last connected:
2026-02-10T20:54:36.765Z - Registered at:
2026-02-09T21:50:14.845Z - Backend services: Running (ports 3000, 3001)
Next Steps
- Investigate the MCP agent token refresh mechanism
- Check if restarting the MCP server resolves the connection
- Add a reconnect/re-auth command to the agent MCP tools
- Consider adding a health check that warns when the agent is disconnected before attempting handoff creation