From 3b038032af863502b9eabcd929a4a5e3718cbcfb Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 26 Mar 2026 11:55:44 +0000 Subject: [PATCH] feat(runner): push channel notifications for AgentStarted + AgentCompleted Runner HandleIPCEvents now catches AgentStarted in addition to AgentCompleted, sending ChannelPush to MCP for both lifecycle events. Co-Authored-By: Virgil --- pkg/runner/runner.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index fe77f60..12a2afc 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -122,8 +122,18 @@ func (s *Service) OnShutdown(_ context.Context) core.Result { // PokeQueue → drain queue func (s *Service) HandleIPCEvents(c *core.Core, msg core.Message) core.Result { switch ev := msg.(type) { + case messages.AgentStarted: + c.ACTION(coremcp.ChannelPush{ + Channel: "agent.status", + Data: map[string]any{ + "agent": ev.Agent, + "repo": ev.Repo, + "workspace": ev.Workspace, + "status": "started", + }, + }) + case messages.AgentCompleted: - // Push channel event to Claude Code via MCP service c.ACTION(coremcp.ChannelPush{ Channel: "agent.status", Data: map[string]any{ @@ -133,7 +143,6 @@ func (s *Service) HandleIPCEvents(c *core.Core, msg core.Message) core.Result { "status": ev.Status, }, }) - // Poke queue to fill freed slot s.Poke() case messages.PokeQueue: