fix(agent-claude-code): stop conflating idle_prompt with permission_prompt#2528
Closed
mukesher4 wants to merge 1 commit into
Closed
fix(agent-claude-code): stop conflating idle_prompt with permission_prompt#2528mukesher4 wants to merge 1 commit into
mukesher4 wants to merge 1 commit into
Conversation
…rompt idle_prompt is Claude Code's routine end-of-turn "done and quiet for now" signal, not a real blocker. Mapping it to ActivityWaitingInput alongside permission_prompt masked real PR status and diluted the "Needs You" signal for sessions that weren't actually blocked. idle_prompt now maps to ActivityIdle; only permission_prompt reports ActivityWaitingInput. Fixes AgentWrapper#2525 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
whoisasx
approved these changes
Jul 9, 2026
whoisasx
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me. The change is narrow and correctly stops treating Claude Code's routine idle_prompt as a real user-blocking state, while keeping permission_prompt mapped to waiting_input.
GitHub CI is green, and the activity/lifecycle interaction looks consistent with the intended semantics. Approving from my side.
Collaborator
|
Closing this in favor of #2541 to avoid duplicate backend activity changes. #2528 and Pulkit’s follow-up on #2541 both fix the same Claude Code behavior: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2525
Summary
notificationState()inbackend/internal/adapters/agent/claudecode/activity.gopreviously mapped bothidle_prompt(routine end-of-turn idling, not a real blocker) andpermission_prompt(genuine tool-permission block) to the samedomain.ActivityWaitingInputstate, causing sessions to showneeds_input— and mask their real PR-derived status — whenever they were simply idle between turns rather than actually blocked.This narrows the mapping so only
permission_promptsetsActivityWaitingInput;idle_promptnow setsActivityIdleinstead. Doc comments inclaudecode/activity.goanddomain/activity.gowere updated to describe the corrected, narrower semantics, and the one test that encoded the old conflated behavior was updated.This is a deliberately narrow fix — it does not change
deriveStatus()'s precedence (confirmed intentional, documented indocs/architecture.md), the reaper's staleness handling (tracked separately in #2501), or any frontend code.Test plan
cd backend && go build ./... && go test ./...