Skip to content

Show a background review waiting at a permission prompt - #45

Merged
haacked merged 1 commit into
mainfrom
haacked/permission-wait-visible
Nov 4, 2026
Merged

haacked merged 1 commit into
mainfrom
haacked/permission-wait-visible

Conversation

@haacked

@haacked haacked commented Nov 4, 2026

Copy link
Copy Markdown
Owner

A background review that stops partway through its turn to ask permission for a tool still shows as working on the dashboard. claude lists that session as state: blocked, status: waiting, and its status file holds the prompt as needs: "approve Bash: <command>". ParseStatus only recognized status: idle, so docket dropped that need and drew no red line. A review of PostHog/posthog-python#1176 sat at one of these prompts for almost four hours before I noticed.

ParseStatus now reads status: waiting as BGStatus.Prompted, and NeedsUser() is true for an ended turn or a prompt. The dashboard and the MCP waiting field read NeedsUser(), and the dashboard lists those rows in a new "Waiting for you" group at the top. The poll's GitHub read and the archive's claude stop still act only on an ended turn, because a prompted session hasn't posted anything and stopping it would delete its clone mid-turn. Two tests fail if either check switches to NeedsUser().

I haven't checked whether a prompt inside one of review-code's sub-agents also shows the main session as waiting.

Test plan

  • bin/test passes.
  • Started a real background session that hit a permission prompt on claude 2.1.318 and ran its listing and status file through ParseStatus, Progress, and progressFor. It read as prompted, with claude's "approve Bash: …" text as the need.
  • Run docket with a background review that hits a permission prompt and confirm the row moves to "Waiting for you" within one poll.

https://claude.ai/code/session_01WXojGBSJfMFp3b3nGTZN2o

claude lists a session stopped partway through its turn at a permission
prompt as status "waiting", which docket read as still working. Read it
as Prompted, report it as needing the user on the dashboard and through
MCP, and list such rows in a "Waiting for you" group at the top. The poll
and the archive still act only on a turn that has ended.

Claude-Session: https://claude.ai/code/session_01WXojGBSJfMFp3b3nGTZN2o
@haacked
haacked marked this pull request as ready for review November 4, 2026 17:07
@haacked
haacked merged commit c3667dc into main Nov 4, 2026
@haacked
haacked deleted the haacked/permission-wait-visible branch November 4, 2026 17: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