From 9de67a6dc6def30eff4e97e8a489650e9646bb47 Mon Sep 17 00:00:00 2001 From: Mathews-Tom Date: Mon, 6 Jul 2026 04:18:41 +0530 Subject: [PATCH] fix(coding-agent): add required messages field to a loader-recovery agent_end fixture The real agent_end event always carries messages: AgentMessage[], but this fixture used a bare { type: "agent_end" }. That was harmless while sendCompletionNotification() ignored its event argument, but the prior commit made it read event.messages, so this fixture now crashes #finishAgentEnd with a TypeError. Add the missing field. --- .../modes/controllers/event-controller-loader-recovery.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/coding-agent/test/modes/controllers/event-controller-loader-recovery.test.ts b/packages/coding-agent/test/modes/controllers/event-controller-loader-recovery.test.ts index b5e1b1109..305636c22 100644 --- a/packages/coding-agent/test/modes/controllers/event-controller-loader-recovery.test.ts +++ b/packages/coding-agent/test/modes/controllers/event-controller-loader-recovery.test.ts @@ -96,7 +96,7 @@ function createContext(options: { terminalProgress?: boolean } = {}) { } const AGENT_START = { type: "agent_start" } as unknown as AgentSessionEvent; -const AGENT_END = { type: "agent_end" } as unknown as AgentSessionEvent; +const AGENT_END = { type: "agent_end", messages: [] } as unknown as AgentSessionEvent; const COMPACTION_START = { type: "auto_compaction_start", reason: "overflow",