Repository navigation
fix(studio): recover a paused approval after Studio restarts - #1200
Merged
Merged
Conversation
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>
This was referenced Nov 18, 2026
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.
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 theimplementeragent on the deployed Studio.Fix
When a new message hits a session paused on a saved approval,
InProcessAgentHostnow 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.tspauses 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 statuserror.Not covered: workspaces that run their own SDK over
lousho bridge(BridgeAgentHost).🤖 Generated with Claude Code