Status: in_progress
Convert EventAgent tool handler exceptions into structured tool-result errors instead of aborting or hanging the debug session.
Dynamic EventAgent tools will eventually call real code. A single tool exception should be visible to the ChatAgent as a tool reply, not break the WebSocket session or leave the runtime waiting forever for a tool response.
This todo covers:
Exception from registry tool handlers.ChatMessage(role="tool") containing a JSON error payload.This todo does not cover:
src/agent_lab/application/event_agent.pytests/test_event_agent.pytests/test_debug_runtime.pydocs/plans/todos.mdRuntimeError("boom").tool_result and reaches done.Catch handler exceptions in EventAgent.handle() and return payload:
{"tool": "handoff_note", "error": "tool handler failed: boom"}
Run:
uv run pytest tests/test_event_agent.py tests/test_debug_runtime.py
uv run pytest
Update this plan and docs/plans/todos.md, then commit.
Expected result: