Skip to content

fix: agent status no longer flickers between warning and in-progress - #79

Merged
aterrylu merged 1 commit into
mainfrom
terry/fix-status-flicker
Mar 26, 2026
Merged

fix: agent status no longer flickers between warning and in-progress#79
aterrylu merged 1 commit into
mainfrom
terry/fix-status-flicker

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Summary

PostToolUseFailure was setting agent status to "error" which mapped to a yellow warning icon. When this happened during active work (subagent running, other tools executing), the icon flickered between warning (⚠) and in-progress (⚙) as events interleaved.

Tool failures are routine in agent work — bash exits non-zero, files not found, etc. The agent handles them and continues. Now PostToolUseFailure keeps status as "working" and records the failed tool as metadata.

The "error" status category is kept in the icon component for backward compatibility with stale persisted states, but the server no longer produces it.

Test plan

  • Start a session, run a command that fails — icon should stay spinning, not flash yellow
  • Run a session with subagents — no flickering between warning and in-progress
  • All 19 hooks tests pass

🤖 Generated with Claude Code

PostToolUseFailure now sets status to "working" instead of "error".
Tool failures (e.g., bash exits non-zero) are routine — the agent
handles them and continues. Setting "error" caused the status icon
to flicker between warning (yellow triangle) and in-progress (spinning)
when errors occurred during subagent orchestration or normal tool use.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aterrylu
aterrylu enabled auto-merge (squash) March 26, 2026 22:06
@aterrylu
aterrylu merged commit 93933a1 into main Mar 26, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/fix-status-flicker branch March 26, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant