Skip to content

fix: complete IPC auth for broadcast and SSH-forwarded sockets#3410

Merged
siddseethepalli merged 1 commit into
mainfrom
swarm/task-11
Feb 17, 2026
Merged

fix: complete IPC auth for broadcast and SSH-forwarded sockets#3410
siddseethepalli merged 1 commit into
mainfrom
swarm/task-11

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Feb 17, 2026

Summary

Addresses two remaining issues from the IPC auth implementation in #3375:

  1. broadcast() leaked messages to unauthenticated sockets — During the 5-second auth timeout window, broadcast() iterated over all connectedSockets, sending messages (like daemon_status with httpPort, session info, etc.) to sockets that hadn't authenticated yet. Fixed by iterating over authenticatedSockets instead.

  2. CLI hard-failed when session token was missing for SSH-forwarded sockets — The CLI's connect() immediately rejected and destroyed the socket when readSessionToken() returned null, breaking the SSH-forwarded socket workflow where the token file exists on the remote host, not locally. Fixed by detecting VELLUM_DAEMON_SOCKET override and proceeding without auth in that case.

Note: The Swift DaemonClient auth (issue #1 from the feedback) was already implemented — authenticate() and AuthMessage send are present in DaemonClient.swift.

Files Changed

  • assistant/src/daemon/server.tsbroadcast() uses authenticatedSockets instead of connectedSockets
  • assistant/src/cli.ts — Graceful fallback when token missing + socket override is set

Test Plan

  • Verify broadcast messages are not received by unauthenticated connections
  • Verify SSH-forwarded socket workflow: VELLUM_DAEMON_SOCKET=~/.vellum/remote.sock vellum connects without crashing
  • Verify normal local auth flow still works

Open with Devin

… token for SSH-forwarded sockets

- broadcast() now iterates over authenticatedSockets instead of
  connectedSockets, preventing unauthenticated connections from
  receiving broadcast messages during the 5-second auth window.
- CLI connect() now gracefully handles missing session token when
  VELLUM_DAEMON_SOCKET is set (SSH-forwarded socket), instead of
  hard-failing before the IPC exchange.

Addresses feedback from #3375.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment thread assistant/src/cli.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14fb6d6cd4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread assistant/src/cli.ts
@siddseethepalli
Copy link
Copy Markdown
Contributor Author

Addressed in #3431

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