Repository navigation
Replies: 3 comments
|
Adding our use case and implementation notes here, per Julius's note on #18373 (closed as a duplicate of this one). Use case. One logical change often spans an application repo, the repo that builds its runtime image, and an infrastructure repo (Ansible here) that deploys it, each with its own branch and PR. Our orchestrator thread lives in a non-git workspace above those repos and hands each piece to a child in a worktree of the right repo. Without this, those children are Implementation notes. We implemented this proposal in our fork today, so these come from building it, not from long use yet:
This fits alongside #16719: |
|
Adding a visibility angle from daily use: one orchestrator thread launches 5–10 workers with The orchestrator's Lineage panel only lists subagents and forks, so none of its launched workers show up there. To answer "which threads did this orchestrator start, and which are still running?" I search the sidebar by a title convention. The data is already recorded. On This proposal would solve it for workers that can become real children. For workers that should stay top-level and interactive, a smaller step could list threads whose first message came from this thread in its Lineage, e.g. a "Launched" group next to the subagent rows. Parentage, wake-up and sidebar placement would stay unchanged. |
|
+1. Without this, the sidebar stops working as an inbox. I use T3 Code as an inbox: each row is a conversation that may need me. The orchestrator thread is the one I talk to. When it needs a worker in its own worktree, the only option today is What this causes in daily use:
Adding @juliusmarminge @t3dotgg I agree that launched threads and delegated tasks are different (from #15031). This proposal keeps that split. It only lets a delegated child run in its own worktree. Could you say if this direction is OK? I can help with the implementation. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
An orchestrating thread can't hand work to a nested child that runs somewhere other than its own checkout.
delegate_taskcreates a proper child: it has a parent, wakes the parent on completion, and is hidden from the sidebar. But the child always inherits the parent'sprojectId,branchandworktreePath(makeSubagentChildThreadinpackages/provider-core/src/server/subagentProjection.tsspreads...input.parentThread).t3_thread_launchcan target any project and a new or existing worktree, but always creates a top-level thread (dispatchThreadCreateinapps/server/src/orchestration-v2/Orchestrator.tswritesparentThreadId: null). There's no wake-up, and the thread lands in the sidebar.Our use case: an orchestrator thread in one repo (a notes vault) coordinates implementation work in other repos on the same machine. Each piece of work runs in its own worktree of the target repo and is reviewed before merging. Today every such child becomes a top-level thread, and the orchestrator has to poll for completion.
#16719 adds
target.projectIdfor linked environments, but explicitly refuses a localtarget.projectIdthat names another project.Proposal
Add optional
projectIdandworkspaceStrategytodelegate_task, reusingOrchestrationV2ThreadLaunchWorkspaceStrategy:packages/contracts/src/orchestratorMcp.ts: add both fields to the input.packages/contracts/src/orchestrationV2.ts: add them to thedelegated_task.requestcommand.OrchestratorMcpService.delegateTask: resolve the project withresolveProjectTargetandassertLiveCallerForOtherProject.dispatchDelegatedTaskRequestandmakeSubagentChildThread: overrideprojectId,branchandworktreePathinstead of copying the parent's.ThreadLaunchService's workspace preparation, and defer the agent start until the worktree is ready, as launches already do.The child keeps everything that makes it a child: parent, completion wake-up, hidden from the sidebar, cancellation with the parent task.
Related: #17401 (sidebar filter by who started a thread) covers the other half of this workflow: the orchestrator's top-level launches crowd the sidebar today.
Happy to send a PR if the direction is agreeable.
All reactions