Skip to content

Fix stale pending user-input after session restart#4

Merged
claude-do merged 1 commit intomainfrom
fix/stale-pending-user-input-restart
Mar 16, 2026
Merged

Fix stale pending user-input after session restart#4
claude-do merged 1 commit intomainfrom
fix/stale-pending-user-input-restart

Conversation

@claude-do
Copy link
Collaborator

Summary

This promotes the pending-question work we validated on dev.

  • add a mobile-visible user-input debug panel for tracing pending question flow
  • stop recovering provider sessions when responding to pending user input
  • fail fast with a clear stale-question message after session restart
  • clear stale pending question UI on the web so normal chat becomes usable again
  • document the Bun PATH/Turbo typecheck gotcha in AGENTS.md

Root Cause

Pending user-input request IDs are session-local and live only in the original provider session's in-memory request map. After a service restart, the thread can still show the pending question in persisted activity state, but the original request ID is no longer answerable.

Before this change, respondToUserInput allowed provider-session recovery, which made the server attempt to answer a stale request on a different session. That produced Unknown pending user input request and left the thread stuck on the question UI.

Fix

  • set allowRecovery: false for respondToUserInput
  • return a clear stale-session validation error instead of attempting recovery
  • map stale user-input failures to a user-facing recovery message in orchestration
  • treat stale user-input failures as closed prompts in session derivation
  • show a Question expired toast and restore access to normal chat

Validation

  • bun fmt
  • bun lint
  • bun typecheck
  • targeted Vitest coverage for provider service, provider command reactor, and web session logic

Related

@claude-do claude-do merged commit 363a7bd into main Mar 16, 2026
6 of 7 checks passed
@claude-do claude-do deleted the fix/stale-pending-user-input-restart branch March 16, 2026 04:09
@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 16, 2026
mcorrig4 added a commit that referenced this pull request Mar 16, 2026
Co-authored-by: Liam C. (do-box) <liam@chaintail.xyz>
claude-do added a commit that referenced this pull request Mar 16, 2026
Co-authored-by: Liam C. (do-box) <liam@chaintail.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants