Skip to content

endpoint_busy locks the whole client after a slow "Delete worktree checkout" times out (0.9.1, macOS) #4578

Description

@dorshinar

Is this a reproducible bug?

  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.
  • I reproduced this bug on the version and environment reported below using the exact steps provided.

Current behavior

Deleting a worktree workspace (sidebar right-click → Delete worktree checkout...) on a large checkout takes long enough that the client-side request times out.

The delete worktree checkout dialog shows the error:

this server did not respond to the action

After the timeout, the client is unusable. Every subsequent action, whether from the UI or the CLI, fails with:

endpoint_busy: this endpoint is still processing another command

There is no way to cancel, retry, or see progress. The only option is to wait until the original delete finishes on the server, at which point the workspace disappears and the client starts responding again.

Expected behavior

If the workspace deletion takes time I expect the dialog to close and let me use herdr as normal - switch to other workspaces, create new, etc

Reproduction

  1. Create a worktree workspace from a large repo (herdr worktree create or the UI), then install dependencies inside it so the checkout is several GB / hundreds of thousands of files
  2. Right-click the worktree workspace in the sidebar → Delete worktree checkout → confirm
  3. Wait for the client to time out
  4. Try anything else: switch workspace, open a tab, or run herdr pane list from a shell

Impact

Every time I clean up a finished worktree workspace, Herdr is frozen for the whole client until the delete finishes. During that time I cannot switch to any other workspace or talk to any running agent. It happens on every delete of a full-size checkout, not intermittently.

Environment

  • Herdr version: 0.9.1
  • Update channel (stable or preview): stable
  • Operating system: macOS 26.7 (25G229), Apple Silicon
  • Terminal: Ghostty 1.3.1
  • Shell, if relevant: zsh 5.9.2
  • git: 2.55.0
  • Relevant config, if any:

Activity

  1. added
    maintainer-neededrequires maintainer judgment or maintainer-only reproduction
    p2valid narrow or ordinary defect with limited impact or a practical workaround
    macosaffects macOS-specific behavior
    sessionsworkspace, tab, or pane lifecycle, restore, and persistence
    on Sep 24, 2026
  2. added
    triagedScreened; left open for investigation or maintainer judgment. Not proof of a bug or reproduction.
    on Sep 24, 2026
  3. persiyanov commented on Oct 5, 2026

    @persiyanov

    Same here on 0.9.3, macOS. The worktrees are normal dev checkouts: a Rust worktree with a 7 GB target/ (92k files) and a JS worktree with an 830 MB node_modules (43–77k files). Deleting either one freezes the client for the whole delete.

    From reading master (b977116), here's why:

    • git worktree remove runs on a server thread, but the client keeps the request open until it finishes.
    • shell_endpoint_command_in_flight makes every other action return endpoint_busy (src/server/headless/endpoint_requests.rs:58).
    • The client gives up after ENDPOINT_COMMAND_TIMEOUT (60s, src/client/endpoint_commands.rs:12), but the endpoint stays locked until git exits.

    #2334 fixed this: it dismissed the dialog, showed a spinner on the row, and reopened the dialog on failure. Would you reconsider it, or something like it? Right now every cleanup of a full-size checkout locks every agent pane for a minute or more.

    Workaround for anyone hitting this: in the worktree, run mv target /tmp/t.$$ && rm -rf /tmp/t.$$ & (or the same for node_modules) before deleting. The rename is instant, and the delete then takes about a second.

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

    macosaffects macOS-specific behaviormaintainer-neededrequires maintainer judgment or maintainer-only reproductionp2valid narrow or ordinary defect with limited impact or a practical workaroundsessionsworkspace, tab, or pane lifecycle, restore, and persistencetriagedScreened; left open for investigation or maintainer judgment. Not proof of a bug or reproduction.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions