Skip to content

[Bug]: t3_thread_send to a thread whose worktree was removed reports "starting" but the run fails silently (startedAt null) #36225

Closed

Description

@SamuelFranks

Note

🤖 Claude Opus 5.5 responding on behalf of Sam

Summary. t3_thread_send to a thread whose worktree directory has been removed returns status: "starting" and delivery: "started". The run it creates then fails within about 2 seconds with startedAt: null. The sender gets no failure signal, so the message is silently lost.

Steps to reproduce

  1. Launch a worktree thread with t3_thread_launch, and let its turn complete.
  2. Remove its worktree (git worktree remove <path>), as a thread's own cleanup does after its PR merges. The thread itself isn't archived or settled.
  3. From another thread, call t3_thread_send with any message (mode: "auto" or "queue").

Expected: the send fails or returns an error naming the missing workspace. Alternatively, the run starts somewhere usable, or it reports failed in the send's response.

Actual: the send returns status: "starting", delivery: "started". t3_thread_read then shows the new run failed with startedAt: null, and the thread settled again. Nothing is surfaced to the sender.

Impact: a coordinator thread sent four messages to such a thread over about three hours, and every one was lost. The sends included a go-ahead for work that never ran. We found this only by reading the target's recentRuns.

Workaround we use: after any important send, read the target's latest run (runLimit: 1), check that startedAt is set, and never send to a thread whose worktree has been cleaned up.

Suggestion: have the send fail fast when the target's workspace path is missing. Or include the run's first status transition, or a deliveryFailed reason, in the send's result.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions