Files
oh-my-pi/packages/coding-agent/test/modes/controllers
Mathews-Tom 90527a5ae4 fix(coding-agent): read the settled turn from agent_end for error notifications
Classifier-refusal failures end a turn with stopReason === "error" but
get pruned from the active context (agent-session.ts's
#removeAssistantMessageFromActiveContext) before agent_end fires.
sendErrorNotification() read viewSession.getLastAssistantMessage(),
which reflects that mutated context and silently missed the
notification for exactly the turns it should fire on.

Thread the agent_end event through #handleAgentEnd -> #finishAgentEnd
so sendErrorNotification reads the turn's own outcome from
agent_end.messages instead.
2026-07-06 04:02:48 +05:30
..