Skip to content

"+" new Claude session fails: "agent name claude is already used" when another Claude session exists #314

Closed

Description

@manolitto

What happened

  1. Start a Claude session with the + button (agent: Claude).
  2. While that session still exists (even with status Done), press + again and start another Claude session.
  3. The workspace is created, but Claude is not started. The popup shows:
    agent name claude is already used; candidates: terminal_id=… pane_id=w3:p1 workspace_id=w3 tab_id=w3:t1 cwd=… status=Done

Expected: a second Claude session starts, just as it does when I run claude by hand in a plain terminal session. That is my current workaround, and several Claude sessions
then run side by side without problems (herdr agent list shows them). So herdr itself is fine with multiple Claude instances; only the name passed to agent.start collides.

Cause (from reading the source, v0.3.41):

  • NewSessionDialog.tsx sends agent: { kind: agentKind } without a name. The dialog's name field only becomes the workspace label.
  • The workspace-create handler in server/index.ts falls back to the kind as the agent name: name: payload.agent.name || payload.agent.kind
  • agent.start requires a unique <NAME>, so every session after the first is rejected while an earlier one named claude exists.

Suggested fix: generate a unique agent name on the server, e.g. ${kind}-${pane_id} or the workspace label plus a suffix, or retry with claude-2, claude-3, … on an
"already used" error. Nice to have: let the dialog set the agent name explicitly.

How often

Every time

herdr web ui version

0.3.41

How it runs

herdr plugin

Server PC

macOS 26.5.2 arm64 (Apple Silicon), herdr 0.9.3

Device and browser

MacBook, macOS 26.5.2, Chrome, browser tab

How the device reaches the server

This PC (localhost)

How it signs in

None

Agent and PC

Claude Code 2.1.287, local PC

Screenshots or logs

Error:
agent name claude is already used; candidates: terminal_id=... pane_id=w3:p1 workspace_id=w3 tab_id=w3:t1 cwd=... status=Done

Activity

  1. added
    bug
    on Oct 2, 2026
  2. added a commit that references this issue on Oct 2, 2026
    e4d2fa2
  3. added a commit that references this issue on Oct 2, 2026
    1608cce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions