Skip to content

Review Agent Relay PR#394

Open
bborn wants to merge 4 commits intomainfrom
task/1027-review-agent-relay-pr
Open

Review Agent Relay PR#394
bborn wants to merge 4 commits intomainfrom
task/1027-review-agent-relay-pr

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Feb 5, 2026

Reviewed PR #357 and fixed multi-process synchronization issue.

Changes:

  • Merged PR feat(relay): add agent-to-agent messaging system #357 (Agent Relay)
  • Fixed critical bug where messages sent via CLI were not picked up by the daemon due to in-memory only queueing
  • Added GetPendingMessages to MessageStore interface and DBStore implementation
  • Updated Relay.GetPendingMessages to fallback to DB store

bborn and others added 4 commits February 2, 2026 21:31
Implement Agent Relay-style messaging for agent-to-agent communication:

- Add relay_messages table for persistent message storage
- Create internal/relay package with Relay manager, agent registry, and message routing
- Support direct messages, broadcast (*), and case-insensitive agent names
- Integrate with executor for agent registration on task start
- Add idle detection for message delivery timing
- Add CLI commands: ty relay send/read/list
- Display relay messages in task detail logs with 📨 icon
- Include comprehensive tests for relay functionality

Messages are routed by agent name (derived from task title) and can be
sent between running agents. Pending messages are delivered when agents
are idle.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix ineffectual assignment lint error (statusIcon variable)
- Fix silent error handling for blockedTasks query
- Add shared CleanAgentName function to avoid code duplication
- Move GetAgentByTaskID and Heartbeat methods to relay.go
- Add agent unregistration when tasks finish (fixes memory leak)
- Track only "output" lines for idle detection
- Replace custom contains() with strings.Contains in tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant