Repository navigation
Automatic enrolment: new threads in a project are managed by its owner thread, without manual hand-overs #43291
matthewcosier
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The problem: every new thread has to be handed over by hand
We run a long-lived coordinator thread that manages several worker threads: it tracks progress, answers their questions, reviews results, and decides what happens next.
When something new comes up, we want to start it right away in its own thread and have the coordinator manage it automatically. Today that takes a manual hand-over every time:
The alternative, asking the coordinator to start the work itself, queues the request behind whatever the coordinator is currently doing. On a coordinator running long turns, that can stall a quick task for hours.
What we want is fluid automatic enrolment. The user starts a thread in a project (from desktop, web, or mobile), the thread starts working immediately, and it is already enrolled with that project's owner thread. No dragging, no "manage this one", no interrupting the coordinator, and no extra step to remember.
Proposal
1. Set a thread as a project's owner. Right-click any thread and choose Set as owner of.... A native submenu lists recent projects (with a check mark on any project the thread already owns; picking it again removes ownership), plus a Search projects... item that opens a searchable project picker styled like the sidebar project selector. Mirror the action in the Command Palette. For most projects it is two clicks: Set as owner of... > my-app.
2. New threads in that project enrol automatically, with a one-click opt-out. When the user starts a thread in an owned project:
Managed by <owner> ×) shows that the thread will be enrolled and lets the user opt out before sending. That avoids surprises and makes it easy to open a throwaway question or a fresh replacement coordinator in the same project. A managed thread can also be detached later without settling it.steer_activeon providers that support non-interrupting active steering, falling back toEffectWorker'ssteer-follow-upif a turn just ended). It never stops or restarts the owner's turn.appContextrather than prompt rewriting, so it can route blockers and results to its owner with existing thread tools, and the note updates cleanly if ownership changes or is removed.Only threads started by the user enrol. Agent-started threads (
delegate_task,t3_thread_launch,create_threads), scheduled tasks, and forks already have their own lifecycle and are not auto-enrolled.3. Permissions, mode ceilings, and questions stay safe and simple.
t3_pending_requestanswers questions only). An owner that approved its workers' permission requests would let one prompt injection in a worker grant itself anything.DispatchModeLimit. If a managed thread runs with broaderruntimeModeorinteractionModethan its owner, the owner can read it and flag the user, while write actions stay blocked as today. The enrolment notice notes when a managed thread is read-only to its owner.t3_pending_request) or the user can answer the single request; the first answer wins and cancels any queued wake.4. Nothing changes in the sidebar or in thread lineage. Ownership is a
project -> ownerThreadIdlink, not a parent-child edge. Managed threads stay exactly where they are in the sidebar with no nesting and no extra sidebar row badges, and the rule that onlydelegate_tasknames a parent (#27012) is untouched.What T3 already has on
mainMost of the machinery needed for this is already built:
Orchestratoralready upgradesdelegated_tasknotices to mid-turnsteer_activewhenever the active provider supports non-interrupting active steering (supportsActiveSteering && activeSteeringInterruptsTools !== true), andEffectWorkeralready turns failed steers on a completed or declined turn into a follow-upmessage.dispatch.DelegatedTaskQuestionReactorandt3_pending_requestalready let an agent and the user race cleanly on the sameruntimeRequest(cancelling stale wakes once resolved), while keeping permission approvals human-only.DispatchModeLimitalready enforces mode ceilings on cross-thread writes, andappContextalready injects reversible per-turn context without touching user prompts.The missing piece is the
project -> ownerThreadIdbinding and automatic server-side enrolment when the user starts a thread in that project.Open questions
Related
Working implementation in a fork
We built and tested an end-to-end version of this in a fork PR (covering contracts, SQLite migration,
ProjectOwnerReactor,ManagedThreadAppContext, non-interrupting mailbox-steer delivery, thread menus, Command Palette, searchable project owner picker, composer opt-out banner, unit/integration tests, and a real-app Playwright e2e scenario):Walkthrough screenshots (captured from the running fork)
1. Set any active thread as owner of one or more projects via the thread menu (recent 10 projects + searchable picker):
2. New drafts in an owned project show a dismissible opt-out banner before sending:
3. Managed threads can be detached any time without settling, while the sidebar stays untouched:
4. The owner thread automatically receives enrolment and idle run-completion notices with direct links:
Happy to open an upstream PR against
mainor adjust the details if the direction looks good.All reactions