Skip to content

[Improve] Make guided agent interactions reliable - #2475

Draft
roomote-roomote[bot] wants to merge 132 commits into
feature/setup-integrations-1qjp5vnseogbgfrom
feature/guided-interactions-2hkp457mhpgoz
Draft

[Improve] Make guided agent interactions reliable#2475
roomote-roomote[bot] wants to merge 132 commits into
feature/setup-integrations-1qjp5vnseogbgfrom
feature/guided-interactions-2hkp457mhpgoz

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Add optional integration discovery to setup: ask about named document, analytics/monitoring, and project-tracking tools; exact-match supported connectors; reuse secure configuration dialogs; and allow users to skip or reorder the funnel without blocking setup completion.
  • Keep guided questions and human choices in chronological Session history, attribute answers to the responder, suppress duplicate successful request_user_input tool rows only when a card exists, keep failed tool calls visible, and leave the composer available beside optional questions.
  • Make structured answers replay-safe: canonical option IDs remain persisted while visible history shows labels; repeated or contending submissions use the persisted winner; deterministic durable continuation recovers if the original process dies after saving an answer.
  • Durably resume setup turns, coalesce setup changes into one deterministic model turn, complete zero-match discovery server-side, and keep the designed reorderable funnel in the prompt while code owns authorization, readiness, persistence, and launch invariants.
  • Share effective integration status across setup and Settings, refresh Fast capabilities after connection/configuration changes, and harden Discord/shared communication actions with guarded cleanup, resume rebinding, stronger callback tokens, and reply-target authorization.

This standalone draft contains and supersedes the relevant implementation from PR #2402. It does not depend on #2402 landing; #2402 remains open and unchanged.

The source branch itself is based directly on main. The PR base still needs to be retargeted to main: the provider-neutral update operation created duplicate draft #2473 instead of changing #2470, and the current task API exposes no retarget or close operation. Do not merge either draft until #2470 is retargeted and #2473 is closed.

Why this change was made

Setup Sessions could require several attempts because tool plumbing appeared before cards, human choices disappeared or showed internal values, asynchronous setup events produced incoherent ordering, and a saved answer could be stranded before model continuation. Connection state and chat interaction guarantees also differed across surfaces.

Impact

Guided interactions now read as one coherent conversation and remain correct across reloads, retries, concurrent submissions, and supported chat adapters. The prompt keeps a deliberately designed setup progression while users can skip or reorder optional steps and the backend enforces reliable conversation-wide behavior.

Validation and local testing

Passed against the standalone main ancestry:

  • pnpm check-types:fast
  • pnpm lint:fast
  • pnpm knip (only the existing Mint configuration hint)
  • 152 focused web client tests
  • 41 focused web server tests
  • 385 focused cloud-agent tests
  • 119 focused SDK tests
  • 32 focused communication/API tests
  • 28 focused shared-type tests
  • Commit formatting hooks and full pre-push gates

Branch ancestry is exactly four commits ahead of origin/main: the two setup-discovery commits, the guided-interactions implementation, and the review-fix commit. Its merge base equals the current origin/main; unrelated post-release develop commits are excluded.

The preview browser was unauthenticated and further login/browser verification was explicitly canceled. No authenticated browser result, screenshot, ordinary-session live smoke, or external OAuth completion is claimed.

Local verification:

  1. git fetch origin
  2. git switch feature/guided-interactions-2hkp457mhpgoz
  3. mise install && pnpm install
  4. Start the normal stack with pnpm dev.
  5. Open a setup or ordinary Session and verify: a successful question card has no duplicate tool row; a failed input request keeps its failure row; optional questions leave the composer available; submitted option labels remain in chronological human-attributed history after reload; setup can skip or reorder integration discovery; a zero-match discovery does not strand readiness events.
  6. With a non-production integration test account, connect a supported provider and return to the Session to verify status/tool availability refresh. Do not use production credentials.

mrubens and others added 30 commits July 10, 2026 19:40
SlackSetupExperience's intro screen owns the step action buttons, and it
is skipped when the Slack config is already saved (savedSatisfied). But
StepAuthEnvVars's providerOwnsActions check was missing the matching
!savedSatisfied clause, so revisiting the auth step with saved Slack
credentials rendered the value form with no action button at all,
stranding the user on the page.

Align providerOwnsActions with the intro guard and add a regression
test for the saved-Slack revisit path.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Hotfix-only cut from main with the #299 Slack setup Continue fix.
[Chore] Release Roomote 0.4.2 hotfix for saved Slack continue
Drop the reverted analytics Model group-by line and document
notification destination and homepage dump-flash fixes now included
on release/v0.5.0.
Merge latest develop (#370, #371), document the Blaxel Compose --wait
fix on the existing 0.5.0 notes, remove the shipping pending changeset,
and quiet residual oxlint/ESLint friction from that merge.
@roomote-community

roomote-community Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

All findings from the linked review task are addressed in the current branch; the final thread was resolved after the check completed.

  • apps/web/src/trpc/commands/fast-sessions/index.ts:680 Setup-session replies from collaborators retain setup guards while setup is incomplete.
  • apps/web/src/app/(sandbox)/sessions/[sessionId]/FastSessionTranscript.tsx:728 Structured responses are attributed to the submitting member.
  • packages/communication/src/request-user-input.ts:296 Source-run cleanup cannot clear a prompt rebound to a resumed run.
  • packages/sdk/src/server/lib/fast-agent-parent-event.ts:2530 Recovered zero-match discovery schedules durable continuation.
  • apps/web/src/trpc/commands/setup/setup-session.ts:1102 Completed setup Sessions allow admin collaborators to resolve pending setup cards.

Fixed through 006ca45

Comment thread apps/web/src/trpc/commands/fast-sessions/index.ts
Comment thread packages/communication/src/request-user-input.ts
Comment thread packages/sdk/src/server/lib/fast-agent-parent-event.ts Outdated
Comment thread apps/web/src/trpc/commands/setup/setup-session.ts
.where(eq(deploymentSettings.id, 'default'))
.limit(1);
if (settings?.setupCompletedAt) {
const row = await findSetupSessionConversationRecord();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback lets a collaborator persist a pending preset response, but its callback still calls reconcileSetupPlatformEvents(auth) with that collaborator. That function immediately returns when findSetupSessionConversation(auth) rejects the non-owner, and preset submissions return before submitFastSessionUserInputCommand schedules an input-response turn. A post-completion collaborator selecting a pending starter-task card therefore records the selection but never schedules the setup turn that launches the chosen work. Reconcile using the setup conversation owner (or otherwise schedule the continuation independently of the submitter).

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.

3 participants