Skip to content

CLI: should return after connection, not block on initial sync (decouple mount/sync) #217

@khaliqgant

Description

@khaliqgant

Problem

relayfile integration connect <provider> establishes the connection (prints <provider> connected) but then blocks indefinitely waiting for the initial sync / keeping the mount active (relayfile-cli/main.go:1713 "Waiting for … initial sync", :1737 "Waiting for … sync status…", :1654 "keep this command running while the mount is active"). For a user whose goal is just to connect an integration (e.g. so agentworkforce deploy can resolve the persona's declared integrations), this looks like a hang and conflates three things: connect, mount, and initial-sync-wait.

Context

This blocking-on-sync was added deliberately (trajectory traj_v0l48chjqje6) in response to earlier feedback that the CLI "looked stuck" after connecting. But it overcorrected: now connect doesn't return at all until the (potentially long) initial sync completes, and it also makes agentworkforce deploy's integration-connect step block the same way.

Proposed change

  • integration connect returns once the connection is established + persisted (Nango connection exists).
  • Mounting + initial-sync-wait becomes opt-in: a --mount/--watch flag on connect, or a separate relayfile mount <provider> command.
  • Update the tests that currently assert the always-wait behavior (main_test.go:921-925) to match the decoupled contract.
  • Knock-on: agentworkforce deploy integration-connect becomes non-blocking.

Priority

Low — workaround is Ctrl-C after " connected" (connection persists), or agentworkforce deploy --no-connect once integrations are connected. Filed from the overnight pr-reviewer E2E work where the slack connect appeared to stall.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions