Skip to content

fix(studio): recover a paused approval after Studio restarts - #1200

Merged
LinuxDevil merged 1 commit into
mainfrom
fix/studio-adopt-orphaned-approval
Nov 18, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
fix/studio-adopt-orphaned-approval

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Problem

A run paused for a tool approval is tracked only in Studio's memory. When Studio restarts (for example on a deploy), the session's checkpoint still says it is awaiting that approval, but the UI no longer shows the Approve/Deny prompt. Every new chat message then fails with LOUSHO_SESSION_AWAITING_APPROVAL, and the agent is stuck for good. This happened to the implementer agent on the deployed Studio.

Fix

When a new message hits a session paused on a saved approval, InProcessAgentHost now adopts that pause instead of failing: it reports the run as paused on the stored approval (with the checkpoint's transcript), so Studio shows the prompt again and approving or denying it resumes the session normally.

If the approval file or checkpoint is missing, it fails as before.

Test

server/__tests__/orphanedPause.test.ts pauses a real run, starts a fresh RunManager and host on the same files (the restart), sends a message, and checks the same approval comes back and can be resolved. It fails without the fix with status error.

Not covered: workspaces that run their own SDK over lousho bridge (BridgeAgentHost).

🤖 Generated with Claude Code

A run paused for approval is only tracked in memory, so restarting Studio
left the session's checkpoint awaiting an approval the UI no longer knew
about. Every new chat message then failed with
LOUSHO_SESSION_AWAITING_APPROVAL and the agent was stuck.

The in-process host now picks up that saved pause when a new message hits
it: it reports the run as paused on the stored approval, so Studio shows
the Approve/Deny prompt again and resolving it resumes the session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil merged commit e5ba475 into main Nov 18, 2026
6 checks passed
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