Repository navigation
fix(sessions): name the connection a blocked launch is waiting on - #227
Merged
Merged
Conversation
A launch refused by the OAuth preflight said "Connect required for 1 OAuth MCP server(s) before launching" and stopped there. The browser is fine — it gets the whole `connections` list and renders a Connect button per server — but a workflow step has no browser: the relay stores only this message on the admission, and the session itself was left a bare `cancelled` with an empty error. Production, 2026-09-09: nine "Verify the story on real staging" steps were refused over three and a half hours because one project-shared Sentry grant had expired. Nothing on the board said so, and nothing named Sentry. The message now names the servers, the three raise sites that dropped the name carry it, and the refusal is recorded on the session so the run shows why it never started. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
This was referenced Nov 12, 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.
What happened
Production, 2026-09-09. Nine "Verify the story on real staging" steps in project 27 were refused before they ever launched, over three and a half hours:
The cause was one project-shared Sentry OAuth grant that had expired. Nothing on the board said so. The only record was on the admission:
Which server? The message did not say, and the step is wired to three (Playwright, Railway MCP, Sentry).
Why the message was anonymous
The interactive path is fine:
Api::V1::TerminalSessionsController#createrenders the wholeconnectionslist andSessionNewFormdraws a "Connect Sentry" button per entry. A workflow step has no browser —SessionLaunchRelaystorese.messageon the admission and nothing else, andSessionAdmissionService.cancel!leaves the session's ownerror_messageblank. So for every non-interactive launch, that one sentence was the entire account of the refusal, and it named a count instead of a server.What changed
Oauth::PreflightErrornames them:Connect required before launching: Sentry,…: Sentry, Railway MCP, and…: MCP server #51when an entry carries no name.SessionServicethat built acredential_errorentry withoutname:now carry it — those are the "credential broke on refresh" paths, exactly the ones that fire without a browser.SessionLaunchRelayrecords the refusal on the session as well as the admission, so a step refused at the gate stops being a barecancelledwith nothing to act on.Tests
test/services/oauth/preflight_error_test.rb(new): one server, several servers, and the unnamed fallback.session_launch_relay_test.rb: a refused launch leavesConnect required before launching: Sentryon both the session and the admission — the production shape.session_service_test.rb: the refresh-failure raise site asserts the named message.SessionNewForm.test.tsxfixture updated to the new string; the per-server Connect CTA is unchanged.rubocopclean on the touched files; the affected backend suites andSessionNewFormpass locally. Full suite is CI's call.🤖 Generated with Claude Code