fix(canvas/a2a-hint): route poll-mode budget timeout away from restart anti-pattern (P1 #348) #1607
Reference in New Issue
Block a user
Delete Branch "fix/a2a-error-hint-timeout-class"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
P1 #348 sub-fix.
canvas/src/components/tabs/chat/a2aErrorHint.tspreviously routed the empty-detail and generic-timeout cases to a bare
"workspace restart is the safe first move" prompt — the anti-pattern
per
feedback_surface_actionable_failure_reason_to_userwhen theunderlying error is a still-in-flight long-running task (PM
coordinating Researcher on codex is the canonical case).
Three changes:
New
polling timeout after/check_task_statuspattern, orderedABOVE the generic timeout bucket, routes the poll-mode budget-
exhaustion shape (emitted by
a2a_tools_delegation.py:199) to ahint that explicitly tells the user NOT to restart and to call
check_task_status with the delegation_id to retrieve the
in-flight result.
New optional
context.peerKindparameter. When the caller knowsthe callee is a codex runtime, the empty-detail and generic-
timeout hints specialise to call out that codex tasks can
legitimately exceed the 600s sync-proxy budget.
The empty-detail branch (the most common "useless hint" path) no
longer claims "restart is the safe first move" by default — it
now tells the user to check the callee's Activity tab before
restarting.
Risk
ActivityTab.tsx:358,AgentCommsPanel.tsx:758) continue to compile unchanged.move" wording; new behavior pinned with 8 added test cases.
Test plan
vitest run a2aErrorHint.test.ts— 17/17 pass (9 prior + 8 new)tsc --noEmitclean for the file (pre-existing unrelated errorsin other test files persist)
canvas shows the new "Do NOT restart" hint
Refs P1 #348, feedback_surface_actionable_failure_reason_to_user.
APPROVED from core-be lens. PR routes poll-mode budget-timeout away from the misleading 'agent error' surface to a more specific 'budget exhausted' hint in canvas. Per feedback_surface_actionable_failure_reason_to_user; closes a UX-papercut where opaque timeouts looked like crashes. CI/all-required=success.
APPROVED from core-qa lens. Hint-routing logic unit-tested; matches canvas TypeScript a2aErrorHint signature. CI green.