Skip to content

fix: non-permission notifications no longer reset status to idle - #80

Merged
aterrylu merged 1 commit into
mainfrom
terry/fix-notification-idle
Mar 26, 2026
Merged

fix: non-permission notifications no longer reset status to idle#80
aterrylu merged 1 commit into
mainfrom
terry/fix-notification-idle

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Summary

Follow-up to #79. Non-permission Notification events (progress, info, idle_prompt) were resetting agent status to "idle" during active work. This caused:

Now only permission_prompt notifications change status to needs_input. All other notification types leave the current status unchanged.

Also added debug logging for transitions to warning-producing statuses (needs_input, error) to help diagnose future issues.

Test plan

  • Session running subagents — status should stay spinning, no green checkmark flashes
  • Session receiving permission prompt — should show yellow triangle correctly
  • All 19 hooks tests pass

🤖 Generated with Claude Code

Notification events with types other than permission_prompt (progress,
info, etc.) were resetting agent status to "idle" during active work,
causing the spinner to briefly show a green checkmark. Now only
permission_prompt notifications change status to needs_input; other
notifications leave the current status unchanged.

Added debug logging for warning-producing status transitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aterrylu
aterrylu enabled auto-merge (squash) March 26, 2026 22:22
@aterrylu
aterrylu merged commit 7ee57d8 into main Mar 26, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/fix-notification-idle branch March 26, 2026 22:23

@nox-0x nox-0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-scoped fix. Returning {} from deriveStatus for non-permission notifications correctly short-circuits the if (statusUpdate.status) guard so no state write occurs — exactly the right no-op semantics. Test update is solid: sets "working" first, then confirms the notification leaves it unchanged. Debug logging is a nice bonus, scoped appropriately to warning-producing transitions only.

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.

2 participants