Skip to content

Remote configs flushed when agent-deck exits with Ctrl+C (data loss) #1067

@asheshgoplani

Description

@asheshgoplani

Bug

Reported by @ddorman-dn in #1066 (comment). All configured remotes disappear after exiting agent-deck with Ctrl+C.

Repro

  1. agent-deck remote add <name> ssh://... for multiple remotes
  2. Verify remotes exist (agent-deck remote list)
  3. Run TUI: agent-deck
  4. Exit with Ctrl+C
  5. agent-deck remote list — all remotes are gone

Screenshot in #1066 (comment) confirms the empty state after restart.

Environment

  • agent-deck v1.9.20 (darwin arm64)
  • SSH over tailscale (xai remote) + SSH over forti vpn (dev-vm) — both SSH-based remotes

Severity

P1 — data loss class. User configuration silently disappears on a normal exit signal.

Root cause hypotheses (investigate)

  1. Remotes are stored in-memory only; the TUI never persists them on Ctrl+C teardown
  2. Remotes are stored to a temp file that the TUI cleans up on exit
  3. Ctrl+C bypasses the normal shutdown path that flushes state to disk
  4. Profile mixup — remotes saved under one profile, restart reads from another

Action

  • Investigate where remote add writes its data — is it a different SQLite table from sessions? A separate config file?
  • Verify the Ctrl+C handler in the TUI properly flushes remote state
  • Write a regression test that adds a remote, kills the process with SIGINT, restarts, asserts remote is still present

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingremoteRemote sessions related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions