Skip to content

fix(agent-claude-code): stop conflating idle_prompt with permission_prompt#2528

Closed
mukesher4 wants to merge 1 commit into
AgentWrapper:mainfrom
mukesher4:pr/2525-fix-idle-prompt
Closed

fix(agent-claude-code): stop conflating idle_prompt with permission_prompt#2528
mukesher4 wants to merge 1 commit into
AgentWrapper:mainfrom
mukesher4:pr/2525-fix-idle-prompt

Conversation

@mukesher4

Copy link
Copy Markdown
Contributor

Fixes #2525

Summary

notificationState() in backend/internal/adapters/agent/claudecode/activity.go previously mapped both idle_prompt (routine end-of-turn idling, not a real blocker) and permission_prompt (genuine tool-permission block) to the same domain.ActivityWaitingInput state, causing sessions to show needs_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_prompt sets ActivityWaitingInput; idle_prompt now sets ActivityIdle instead. Doc comments in claudecode/activity.go and domain/activity.go were 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 in docs/architecture.md), the reaper's staleness handling (tracked separately in #2501), or any frontend code.

Test plan

  • cd backend && go build ./... && go test ./...

…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 whoisasx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@whoisasx

whoisasx commented Jul 9, 2026

Copy link
Copy Markdown
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: idle_prompt should map to idle, while permission_prompt remains waiting_input. #2541 also carries the broader topbar UI fix for #2540, frontend regression tests, and screenshots, so keeping #2541 as the active PR is the cleaner path.

@whoisasx whoisasx closed this Jul 9, 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.

bug(agent-claude-code): idle_prompt notification conflated with permission_prompt, both set activity=waiting_input

2 participants