connect: open watch-only when the server says a session takes no prompts#78
Merged
Merged
Conversation
A Slack mention session is keyed and live, so the old local rule ("keyed and
not closed") called it sendable and opened a composer. But a mention agent
posts every answer back to its surface, so a message typed here would be
injected and then answered in a Slack thread that never showed the question
(prod session_WOcLHUAK..., 2026-07-24). The send now 409s server-side, which
would have surfaced as a failed Enter.
connectability reads the server's `prompting` projection instead: the SAME one
POST /messages enforces, so the composer opens exactly where a send would land.
Its `detail` is rendered verbatim, so a new refusal reason reads correctly with
no CLI release. Servers predating the field fall back to the previous
keyed/closed read, so an upgraded binary still works against an older backend.
One seam covers both entry points: `agent session connect` and the
multi-session UI already share connectability.
Requires @ellipsis-dev/sdk 0.2.3, which exports SessionPrompting.
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.
Summary
A mention session (Slack, GitHub, or Linear) is a durable keyed conversation, so the old local rule in
connectability("keyed and not closed") treated it as sendable and opened a composer. But a mention agent posts every answer back to the surface it was mentioned on, so a message typed here would be answered in a thread that never showed the question. The backend now refuses these sends with409, so without this change the composer opens and fails on the first Enter.connectabilitynow reads the server'spromptingprojection, the same onePOST /messagesenforces, so the composer opens exactly where a send would land:Two deliberate choices:
detailis rendered verbatim rather than switching onblocked_reason, so a refusal reason added server-side reads correctly with no CLI release.One seam covers both entry points:
agent session connectand the multi-session UI already shareconnectability.Requires
@ellipsis-dev/sdk0.2.3, which exportsSessionPrompting; dep bumped from^0.2.0.Test plan
bun run typecheckagainst the SDK's generatedSessionPromptingbun run test- 283 passed, including 4 new cases: honors the projection over the local read, sends when enabled, falls back when the field is absent, generic copy whendetailis nullbun run build+bun build --compile+agent --version(the remaining CI gates)connectabilitywith a mention-session payload as the API returns it: opens watch-only with the server's sentence, while self-started and pre-field sessions keep the composer