fix(issues): hide StructuredOutput tool events from investigation UI

StructuredOutput is an internal SDK tool for schema validation. When
the agent's first attempt doesn't validate, the SDK rejects it and
the agent retries automatically. These internal retry cycles were
showing as "StructuredOutput failed" in the investigation progress UI,
which is confusing since they're expected SDK behavior.

Filter out StructuredOutput tool_start/tool_end events from the
progress callbacks so they don't appear in the UI.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
Sondre Engebråten
2026-02-14 14:15:54 +01:00
co-authored by Claude Opus 4.6
parent 9e1ee24e8a
commit 8b9d412e85
@@ -373,6 +373,9 @@ Use Read, Grep, and Glob tools to explore the codebase.
def _on_tool_use(name, tid, inp, _name=cfg.name, _map=_tool_names):
_map[tid] = name
# StructuredOutput is an internal SDK tool — don't show in UI
if name == "StructuredOutput":
return
emit_json_event(
"tool_start",
_name,
@@ -382,6 +385,9 @@ Use Read, Grep, and Glob tools to explore the codebase.
def _on_tool_result(tid, err, _, _name=cfg.name, _map=_tool_names):
tool = _map.pop(tid, None)
# StructuredOutput is an internal SDK tool — don't show in UI
if tool == "StructuredOutput":
return
emit_json_event(
"tool_end",
_name,