Skip to content

"Thread completed" notification fires when a thread leaves Monitoring, before the agent resumes #13733

Description

@hkarlsen06

What happened

Every time a thread goes into monitoring or comes out of monitoring (at least every time it comes out of monitoring) i get a notification and notification sound that says the thread was completed, when it obviously was not. it is annoying, i only want a notification when the thread was actually completed

Diagnosis

ThreadNotificationCoordinator (apps/web/src/components/ThreadNotificationCoordinator.tsx, ~L124-139) fires a "Thread completed" notification + completion sound whenever a thread's sidebar status is ready, latestTurn.state === "completed", and latestTurn.completedAt is newer than the last completion it recorded.

resolveSidebarThreadStatus (apps/web/src/components/Sidebar.logic.ts, ~L839-863) returns monitoring while backgroundLiveness === "monitoring" (Monitor tasks / background shells are the only live work). While in that state the coordinator carries the prior completion forward, so the turn that ended with a watch loop still running is "pending" rather than notified.

As soon as the watch loop ends (or wakes the agent), backgroundLiveness clears and the status resolves to ready for at least one shell snapshot before the agent's next turn sets the session back to running. In that snapshot the turn's completedAt is newer than the recorded completion, so the coordinator emits "Thread completed" even though the agent is about to continue.

The "entering monitoring" case is likely the mirror race (session goes idle one snapshot before backgroundLiveness: "monitoring" arrives), but this was not confirmed from logs.

The logic is unchanged on main as of 2026-09-26 (last touch: 315fcca, colors only).

Possible direction: don't treat a monitoring/background-live → ready transition as a new completion unless the thread stays ready (e.g. debounce), or only notify completion when the transition comes from working with no background liveness pending.

Steps to reproduce

  1. Enable notifications (Settings → Notifications → "Notifications with sound").
  2. In a Claude thread, have the agent start a Monitor watch loop or background shell and end its turn while it's running (sidebar shows "Monitoring").
  3. Let the monitor fire / finish so the agent resumes.
  4. Observe a "Thread completed" notification and sound, while the thread goes straight back to Working.

Not verified whether it also triggers while viewing the thread in the foreground (in-app toast path excludes the active thread, but the sound still plays).

Version

T3 Code Desktop 0.0.43-nightly.20260924.2213 (CLI 0.0.42)

Environment

macOS (Darwin 27.2.0, arm64), Node v26.8.2, desktop app running its bundled local server

Evidence

Diagnosed from source; no relevant log lines captured (provider event log absent on this machine).

Related issues

#10164 also involves the Monitoring status but is about the Monitoring indicator hiding the Compact notification; not a duplicate.

Fix applied or workaround

None applied. Only workaround is lowering notificationMode, which also silences real completions.

Filed by

Claude Code (Claude Opus 5.5) via t3 triage

Activity

  1. juliusmarminge commented on Sep 26, 2026

    @juliusmarminge
    Member

    Duplicate of #13625 — same false "Thread completed" / completion sound when backgroundLiveness clears after a monitor or subagent finishes and the thread briefly reads ready before the wake-up turn starts. #13625 is already triaged (bug / accepted) with the same ThreadNotificationCoordinator root cause.

  2. juliusmarminge commented on Sep 26, 2026

    @juliusmarminge
    Member

    Closing as duplicate of #13625.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions