-
Notifications
You must be signed in to change notification settings - Fork 196
No JSON API for tmux_session #455
Description
Issue
Often agent-deck leaves "dead" tmux sessions, after working on many projects for a while this becomes an issue, you can have tons of tmux sessions that are basically dead, not present in the DB, not active, just hanging around, we need a way to at least which ones are actually in use, or, better, a way to clean them up
Description
agent-deck list --json and agent-deck session show <id> --json have no tmux_session field, even though the SQLite database (~/.agent-deck/profiles/default/state.db) has the correct values populated.
Reproduction
# DB has the correct tmux session names
sqlite3 ~/.agent-deck/profiles/default/state.db \
"SELECT id, tmux_session, status FROM instances WHERE tmux_session IS NOT NULL;"
# Example output:
# dd44ddfb-1772193322|agentdeck_main_547f872c|runningImpact
External tools that need to map tmux sessions to agent-deck sessions cannot use the API and must read the SQLite DB directly as a workaround. Use cases like Orphan cleanup so identifying tmux sessions starting with agentdeck_ that are no longer tracked by agent-deck (for cleanup scripts).