Skip to content

fix: suppress idle hooks during active subagents - #9

Open
shanebishop1 wants to merge 4 commits into
mainfrom
fix/session-hooks-parent-default
Open

fix: suppress idle hooks during active subagents#9
shanebishop1 wants to merge 4 commits into
mainfrom
fix/session-hooks-parent-default

Conversation

@shanebishop1

@shanebishop1 shanebishop1 commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Closes #5.

Summary

  • Add opt-in excludeSubagentWait filtering for session.idle hooks.
  • Track active task calls per session and suppress only opted-in hooks until every call finishes.
  • Preserve existing idle-hook behavior when the option is omitted.
  • Clear tracked state when task calls finish or sessions are deleted.
  • Document the notification use case and cover concurrent subagents with regression tests.

Configuration

{
  "id": "waiting-for-input",
  "when": {
    "event": "session.idle",
    "excludeSubagentWait": true
  },
  "run": ["notify-user.sh 'Waiting for input'"]
}

Verification

  • npm run lint
  • npm run typecheck
  • npx --yes bun@1.3.9 test (130 passed, 3 gated skips)
  • npm run build

@shanebishop1 shanebishop1 changed the title feat: scope session hooks to parent sessions fix: suppress idle hooks during active subagents Jul 27, 2026
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.

Feature: session.idle should not fire during active subagent execution

1 participant