Skip to content

[Bug]: Orchestrator V2: Claude provider event stream closes after t3_worktree_handoff #16520

Closed as not planned

Description

@ayaz-khan-niazi

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Summary

T3 Orchestrator V2 successfully delegates a task to Claude and successfully creates/binds an isolated Git worktree using t3_worktree_handoff.

However, immediately after the handoff, when the Claude continuation should start inside the newly bound worktree, the provider event stream closes unexpectedly.

The continuation never executes.

This has been reproduced 3/3 times using separate disposable worktrees/branches.

Normal Codex → Claude delegation without t3_worktree_handoff works correctly.


Environment

  • OS: Ubuntu Server 24.04
  • T3 Code: v0.0.46-nightly.20261005.2702
  • T3 channel: nightly
  • Claude Code: 2.1.291
  • Codex CLI: 0.160.1
  • Node.js: 24.21.0
  • npm: 11.19.0
  • Git: 2.43.0

Claude and Codex are both authenticated and working independently.

GitHub CLI (gh) is installed and authenticated.


What works

The following functionality works correctly:

  1. Codex parent/lead thread starts normally.
  2. Codex uses T3 V2 delegate_task.
  3. A Claude Sonnet 4.6 delegated child thread is created.
  4. Normal read-only Codex → Claude delegation completes successfully.
  5. Claude can inspect the repository and return its result to the Codex parent.
  6. t3_worktree_handoff successfully creates the requested Git worktree.
  7. The delegated Claude thread is bound to the new worktree.
  8. The canonical repository remains untouched.

Standalone Claude CLI was also tested successfully.

Example standalone test:

cd ~/projects/projAstra
claude -p "Reply with exactly: CLAUDE_OK"

Result:

CLAUDE_OK

Therefore Claude authentication/basic provider execution itself appears healthy.


What fails

After t3_worktree_handoff, the Claude continuation that should execute inside the newly bound worktree never starts.

T3 reports:

The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs.

The worktree itself has already been successfully created and bound when this happens.

No command from the continuation prompt is executed.

The test file that the continuation was supposed to create is never created.


Minimal reproduction

Parent repository:

/home/alsaadis/projects/ProjAstra

From a Codex parent thread:

  1. Use T3 V2 delegate_task to delegate a task to Claude Sonnet 4.6.
  2. Claude performs initial read-only inspection successfully.
  3. Claude calls native t3_worktree_handoff.
  4. Use a new disposable worktree/branch with:
    • baseRef=main
    • startFromOrigin=false
    • runSetupScript=false
  5. Supply a continuation prompt instructing Claude to perform a trivial write inside the newly bound worktree.

Example disposable R3 worktree:

/home/alsaadis/projects/ProjAstra-t3-write-isolation-20261006-r3

Example branch:

t3-write-isolation-test-20261006-r3

The continuation's only requested write was creation of:

orchestration-write-isolation-test.txt

with exact contents:

T3 V2 Claude write isolation test

Expected

After t3_worktree_handoff:

  • Claude resumes/continues in the newly bound worktree.
  • The continuation prompt executes.
  • The test file is created only inside the worktree.

Actual

  • Worktree creation succeeds.
  • Thread/worktree binding succeeds.
  • A continuation run is created.
  • Claude continuation never executes.
  • Provider event stream closes.
  • T3 reports an Orchestrator V2 provider-event-ingestion failure.
  • Test file is absent.

Reproduction rate

Reproduced three times:

  • R1: failed
  • R2: failed
  • R3: failed

Each reproduction used a separate disposable branch/worktree.

Every reproduction followed the same pattern:

delegate_task
    ↓
Claude child starts successfully
    ↓
t3_worktree_handoff
    ↓
worktree created successfully
    ↓
thread bound to worktree
    ↓
continuation run starts
    ↓
provider event stream closes
    ↓
continuation never executes

Cleanup succeeded after each attempt.


Debug reproduction

R3 was reproduced while running T3 with:

t3 --log-level debug serve 2>&1 | tee ~/t3-debug.log

The failure occurred at approximately:

2026-10-06 17:14:40 UTC

Relevant sequence:

[17:14:40.217] DEBUG: thread.metadata-updated

[17:14:40.228] DEBUG:
eventType: 'run.created'

[17:14:40.237] WARN:
orchestration V2 provider event ingestion failed
{
  runId: 'run:thread:thread%3Adelegated-task...projastra-t3v2-write-isolation-20261006-r3:ordinal:1',
  cause: { _id: 'Cause', failures: [ [Object] ] }
}

[17:14:40.255] DEBUG:
eventType: 'run.updated'

[17:14:40.255] DEBUG:
eventType: 'provider-thread.updated'

This appears to place the failure at V2 provider-event ingestion when starting the post-worktree-handoff continuation.

One difficulty diagnosing further is that even with --log-level debug, the actual failure object is collapsed to:

cause: { _id: 'Cause', failures: [ [Object] ] }

It would also be useful if T3 could expose/log the underlying failure here.


Claude SDK warning

During the delegated Claude run, T3 also prints:

[CLAUDE_SDK_CAN_USE_TOOL_SHADOWED]

Warning: canUseTool will not be invoked: permissionMode 'bypassPermissions'
auto-approves every tool call (except explicit deny rules) before the
callback is consulted. To gate every tool call, use a PreToolUse hook instead.

The warning occurs before the continuation failure.

I do not know whether it is related, but I am including it for completeness.


Background Git fetch warning

T3 also periodically reports:

Background Git fetch failed

GitCommandError: Git command failed in
GitVcsDriver.fetchRemoteForStatus (...):
Git command timed out.

However, manual:

git fetch origin

from the same repository completes successfully.

The worktree is also successfully created before the Claude continuation failure.

Therefore this currently appears to be separate from the provider-event-ingestion failure, but I am including it in case it is relevant.


Additional isolation performed

To rule out general provider/setup problems:

Claude standalone

PASS.

Claude CLI executes normally outside this handoff flow.

Normal T3 V2 cross-provider delegation

PASS.

Codex → delegate_task → Claude Sonnet 4.6 → result returned to Codex works.

Worktree creation

PASS.

t3_worktree_handoff creates the expected worktree and branch.

Worktree/thread binding

PASS.

The delegated Claude thread is moved/bound to the expected worktree.

Post-handoff continuation

FAIL.

This is the specific stage that fails consistently.


Possibly related issues

This may be related to existing Orchestrator V2 Claude continuation/session lifecycle issues, including:

However, I could not find an existing report specifically covering:

Claude delegated child
→ t3_worktree_handoff succeeds
→ worktree/thread binding succeeds
→ post-handoff continuation run created
→ V2 provider event ingestion fails
→ provider stream closes

So I am filing this separately with the reproducible handoff case.


Expected behavior

After t3_worktree_handoff, the delegated Claude child should resume in the newly bound worktree and execute the supplied continuation prompt.

Actual behavior

The worktree and binding are successfully created, but when T3 creates the post-handoff continuation run, V2 provider-event ingestion fails and the Claude provider event stream closes.

The continuation never executes.


Safety / cleanup verification

After each failed reproduction:

  • queued continuation was cancelled
  • delegated child was archived
  • disposable worktree was removed
  • disposable branch was removed
  • canonical repository remained clean
  • canonical HEAD remained unchanged

No commits, pushes, merges, application changes, database changes, or alternative write mechanism were used.

Expected behavior

After t3_worktree_handoff successfully creates and binds the delegated Claude thread to the new worktree, Claude should resume in that worktree and execute the supplied continuation prompt.

Actual behavior

The worktree is created and bound successfully, but when the post-handoff continuation starts, T3 reports "orchestration V2 provider event ingestion failed" and the Claude provider event stream closes unexpectedly. The continuation never executes.

Impact

Blocks work completely

Version or commit

No response

Environment

No response

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 6, 2026
  2. juliusmarminge commented on Oct 6, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Thanks for the detailed report and the 3/3 repro. This is the same bug as #15136: after t3_worktree_handoff the planned session detach is treated as an unexpected provider stream close for the Claude driver, so the queued continuation never starts. Closing this as a duplicate so the discussion stays in one place; please follow #15136. Open PR #15203 is working on a fix. If you see something different from what's described there, add it as a comment on #15136.

  3. added
    duplicateThis issue or pull request already exists
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 6, 2026
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

    bugSomething is broken or behaving incorrectly.duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions