claude-code - 💡(How to fix) Fix [Feature] Native settings option for idle/ready notification (no hook needed) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55183Fetched 2026-05-02 05:46:04
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Add a built-in config option in settings.json that triggers a sound (terminal bell, local command, or system notification) when Claude Code returns to the idle state waiting for user input. Implementation lives in the binary — no hooks, no LLM tokens, no shell scripts to maintain.

Root Cause

Fires once on the transition into "ready for next user prompt". Subagent stops, auto-compaction, and internal continuations do not trigger it — the runtime distinguishes those because the state is internal to the binary.

Fix Action

Fix / Workaround

Long-running tasks make users tab away. When Claude finishes a complex task and waits for the next prompt, there's no audible signal that it's ready. Hook-based workarounds are unreliable:

Code Example

{
  "idleNotify": {
    "enabled": true,
    "command": "paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
  }
}

---

{
  "idleNotify": "bell"
}
RAW_BUFFERClick to expand / collapse

[Feature] Native settings option for idle/ready notification (no hook needed)

Summary

Add a built-in config option in settings.json that triggers a sound (terminal bell, local command, or system notification) when Claude Code returns to the idle state waiting for user input. Implementation lives in the binary — no hooks, no LLM tokens, no shell scripts to maintain.

Motivation

Long-running tasks make users tab away. When Claude finishes a complex task and waits for the next prompt, there's no audible signal that it's ready. Hook-based workarounds are unreliable:

  • Stop hook fires multiple times within complex tasks (subagent bubbling, plan mode, internal continuations) → false beeps mid-task
  • Notification with idle_prompt matcher is documented as buggy (#8320) → fires on every response, not on real idle
  • DIY state machines via shell hooks consume time, debugging effort, and miss edge cases (we tried)

Issue #13024 requests the same goal but as a hook. A hook still requires the user to write/maintain shell scripts, handle WSLg/Wayland/macOS audio differences, and reinvent debounce logic — all for a binary state the runtime already knows internally.

Proposed Design (mirrors existing statusLine)

{
  "idleNotify": {
    "enabled": true,
    "command": "paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
  }
}

Or a minimal terminal-bell variant:

{
  "idleNotify": "bell"
}

Possible values:

  • "bell" — emit \a to the terminal
  • "none" (default) — disabled
  • { "command": "<shell command>" } — runtime invokes any local command

Fires once on the transition into "ready for next user prompt". Subagent stops, auto-compaction, and internal continuations do not trigger it — the runtime distinguishes those because the state is internal to the binary.

Why Not a Hook

A hook can't reliably distinguish "Claude is idle waiting for me" from "Claude is mid-task between internal turns" — the difference lives inside the binary. Exposing the transition as a native config trigger:

  1. Solves the problem correctly (no false positives possible)
  2. Zero LLM token cost
  3. Removes WSLg/Wayland/macOS/tmux audio concerns from user-space
  4. No shell debugging, no state files in /tmp

Precedent

statusLine is the existing pattern: native config, runtime decides invocation timing, user provides a local command. idleNotify would be the same shape.

Related

  • #13024 — same goal, hook-based proposal
  • #8320 — idle_prompt notification matcher bug
  • #12048 — broader notification matcher gaps

extent analysis

TL;DR

Implement a native idleNotify configuration option in settings.json to trigger a sound or system notification when Claude Code returns to the idle state.

Guidance

  • Add an idleNotify section to settings.json with options for enabling notifications and specifying a command or sound to play.
  • Set enabled to true and choose a command or use the "bell" option to emit a terminal bell.
  • Verify that the notification fires only once when transitioning into the "ready for next user prompt" state.
  • Consider the proposed design and possible values for idleNotify to ensure correct implementation.

Example

{
  "idleNotify": {
    "enabled": true,
    "command": "paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
  }
}

Notes

The implementation should distinguish between "Claude is idle waiting for user input" and "Claude is mid-task between internal turns" to avoid false positives.

Recommendation

Apply the proposed idleNotify configuration option to provide a native solution for idle/ready notifications without relying on hooks or shell scripts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Feature] Native settings option for idle/ready notification (no hook needed) [1 comments, 2 participants]