Skip to content

Pi worktree handoff stays Waiting after the continuation completes #38576

Closed

Description

@ilja

What happened

After t3_worktree_handoff moved a Pi thread into a new worktree, T3 kept showing Waiting · mcp__t3-code__t3_worktree_handoff. The continuation and later turns completed in the new worktree. There was no active run. The handoff row should have stopped showing as pending.

Diagnosis

Git worktree creation and the thread rebind succeeded. The MCP request ended as Interrupted during the session switch, but T3 left the tool item marked running and counted it as pending background work.

Steps to reproduce

  1. Start a Pi thread in the root checkout of a Git project.
  2. Have Pi call t3_worktree_handoff with a new branch and a continuationPrompt. In the observed case, startFromOrigin was true.
  3. Let the continuation finish in the new worktree. Check the handoff row after the thread is idle.

Version

0.1.11-nightly.20261117.4838

Environment

T3 Code Desktop Nightly, local server, macOS arm64, Pi provider in Full Access mode.

Evidence

Server trace: GitWorkflowService.createWorktree = Success; thread.metadata.update = Success; mcp.tool.t3_worktree_handoff = Interrupted.
Read-only DB query: handoff item status = running, completedAt = null; owning run status = completed.
Thread state: activeRunId = null; pendingBackgroundTasks contains mcp__t3-code__t3_worktree_handoff.

Related issues

#15993 was closed by #29036, already in this build. That cleanup requires backgroundTasksEndWithProcess, which Pi does not declare. The same gate remains in nightly 0.1.11-nightly.20261118.4877.

Fix applied or workaround

The thread remains usable. Clicking Stop cleared the stale row for some reports on #15993, but it was not tested on this thread.

Filed by

Pi (openai-codex/gpt-6.2-sol) via T3 Code triage.

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

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions