Skip to content

fix(workspace): use persisted agent type when reconnecting tmux sessions#150

Open
jacola wants to merge 1 commit intomarcus:mainfrom
jacola:fix/reconnect-agent-type
Open

fix(workspace): use persisted agent type when reconnecting tmux sessions#150
jacola wants to merge 1 commit intomarcus:mainfrom
jacola:fix/reconnect-agent-type

Conversation

@jacola
Copy link

@jacola jacola commented Feb 12, 2026

Problem

reconnectAgents() hardcodes AgentClaude for every reconnected tmux session, ignoring the .sidecar-agent file persisted in each worktree. This causes non-Claude agents (Copilot, Codex, Gemini, etc.) to display as "claude" in the workspace sidebar after restarting sidecar.

Fix

Read wt.ChosenAgentType (already loaded from .sidecar-agent at startup) when creating the agent record during reconnection. Falls back to AgentClaude only when no agent type was persisted.

Testing

  1. Launch a worktree with a non-Claude agent (e.g. Copilot)
  2. Exit and restart sidecar
  3. Verify the workspace sidebar shows the correct agent name instead of "claude"

reconnectAgents() hardcoded AgentClaude for every reconnected session,
ignoring the .sidecar-agent file. This caused non-Claude agents (e.g.
Copilot, Codex, Gemini) to display as 'claude' after restarting sidecar.

Now reads wt.ChosenAgentType (loaded from .sidecar-agent) and only
falls back to AgentClaude when no agent type was persisted.
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