Skip to content

fix(runs): allow host attachment confirmation for run sessions#2330

Merged
siddseethepalli merged 1 commit into
mainfrom
swarm/task-3
Feb 15, 2026
Merged

fix(runs): allow host attachment confirmation for run sessions#2330
siddseethepalli merged 1 commit into
mainfrom
swarm/task-3

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Feb 15, 2026

Summary

Run sessions created via the HTTP API DO have a client (the HTTP caller), they just don't have a WebSocket/IPC client. The hasNoClient flag was incorrectly set to true for run sessions, causing approveHostAttachmentRead to deny immediately — host attachment directives could never enter needs_confirmation state and were always skipped.

The fix: Remove hasNoClient=true from the updateClient call during active run processing in RunOrchestrator.startRun(). The run orchestrator already intercepts confirmation_request events and stores them via runsStore.setRunConfirmation, so the /runs/:id/decision endpoint can handle approvals. The hasNoClient=true flag is still set in the cleanup callback after the run completes, since there truly is no client at that point.

Changes

  • assistant/src/runtime/run-orchestrator.ts: Remove hasNoClient=true from updateClient() during active run, keeping it only in the post-run cleanup.

Addresses feedback from PR #2306.


Open with Devin

Run sessions created via the HTTP API have a client (the HTTP caller)
and handle confirmations through the /runs/:id/decision endpoint.
Setting hasNoClient=true caused approveHostAttachmentRead to deny
immediately, preventing host attachment directives from entering
needs_confirmation state. Remove hasNoClient=true during active run
processing so the prompter can emit confirmation_request events that
the run orchestrator intercepts and stores for the decision endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@siddseethepalli siddseethepalli self-assigned this Feb 15, 2026
@siddseethepalli siddseethepalli merged commit f7d36e2 into main Feb 15, 2026
1 check failed
@siddseethepalli siddseethepalli deleted the swarm/task-3 branch February 15, 2026 06:12
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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