Skip to content

[teams] Real-time message push to running teammates #149

@0bserver07

Description

@0bserver07

Problem

The chimera-team MCP server exposes team_send_message and team_recv_messages, but messaging is pull-only: a teammate drains its mailbox only when it invokes team_recv_messages. With spawn-per-task runner semantics (see #2), that means a teammate only sees mail at the start of its next task. Mid-task "stop, requirements changed" delivery is impossible.

Scope

Three orthogonal pieces:

  1. Transport. Add a push channel from chimera-team-mcp (or the runner) to the running teammate. ACP supports server→client notifications (session/update). For non-ACP agents, we'd need a sidecar that watches the team mailbox and pokes the agent's process (signal? file descriptor? probably depends on runtime).

  2. Mailbox semantics. Today mailbox files are drained on read. Add per-message delivery cursors so a push can be acked without losing other unread messages.

  3. Runner integration. When session reuse (Git-aware workflow: branch isolation, diff-aware context, commit integration #2) is in play, the runner should watch the agent's mailbox file (mailbox/<agent>.jsonl) and route new entries to the live session.

Acceptance

  • A teammate running in reuse mode receives a team_send_message payload within ~1s of it being sent
  • Existing pull semantics still work for spawn-per-task agents (backwards compat)
  • Tests: mid-session delivery for ACP agent; cursor advances without re-delivery

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions