Repository navigation
Description
Problem
An orchestrator thread starts other threads to do its work: in its own project, in other projects, and in other environments. Many of them end up as top-level sidebar rows with no link back to the thread that made them, and they stay behind after the orchestrator is finished and archived. The owner's rule is: "I only want to see top-level threads in the sidebar that I expect to see, because I specifically asked for them (or created them myself)."
PR #749 repaired the stored creator for historical threads. This issue tracks the behaviour change for new ones.
Model
Every agent-created thread records an owner thread (environment-qualified) unless the user asked for a top-level thread. The sidebar, archive and promote all follow that one record.
Ownership is not retroactive: threads that existed before this work keep their current placement and lifecycle. #749 records where they came from; it does not make them owned.
Vocabulary
| Term | Meaning |
|---|---|
| task | Owned, short-lived work the user does not expect to look at |
| child thread | Owned, interactive thread whose lifecycle is tied to its orchestrator |
| top-level thread | Independent sidebar root; created only when the user asks for one |
| group thread | Empty thread that exists only to hold other threads |
| promote X | Release X from its owner so it becomes a top-level thread |
| wrap up | Finish an orchestrator: archive what it owns, ask about the rest |
"Delegated" and "launched" name how a thread runs. They are separate from where it is placed.
Decisions
- Owned threads never appear as sidebar roots.
- Same project in another environment: nested under the orchestrator.
- Another project: a collapsed group in the destination project, labelled with the orchestrator and linking back to it. The sidebar derives the group from ownership; it is not a stored thread. No true cross-project nesting for now.
- Group threads carry a stored marker. First UI: italic title with the agent-created icon before the name, like persistent threads.
- Archiving an orchestrator archives its tasks everywhere. It asks before archiving child threads the user has typed in.
- A thread the user types in stays owned until they say "promote".
- Projects an agent registers only as throwaway workspace for a run are marked temporary, hidden, and removed at wrap-up.
- A task delegated to another environment may ask for its own worktree when its base is a branch or commit that environment can fetch.
- Archive changes stay in the fork-owned archive planner and contracts so upstream changes do not collide with them.
Pull requests
- A. Group threads: stored marker, sidebar treatment, backfill of existing empty parents. (feat(threads): mark agent-created group threads #752)
- B. Owner record (Record owners when agents launch threads #753): every agent launch records its owner, including launches into another environment and scheduled runs; top-level only when asked. One shared "who owns this thread" helper for the PRs below.
- C. Sidebar (feat(sidebar): place owned threads with their owner #762): owned threads are never roots; nest under the owner in the same project, on any environment; a collapsed group per owner for another project, derived by the sidebar rather than stored; show the stored creator instead of "Creator unknown".
- D1. Promote (feat(threads): promote owned threads to top level and return them to their owner #763): release a thread from its owner, including a delegated child, with a way back.
- D2. Archive (feat(threads): archive owned work across projects at wrap-up #764): archiving an orchestrator archives what it owns in every project in the same environment and asks about threads the user typed in.
- D3. Remove temporary projects at wrap-up (feat(threads): remove temporary projects at wrap-up #771).
- D4. Archive across environments (feat(threads): show linked environments in the archive preview #772 preview, feat(threads): archive and restore owned work on linked machines #786 archive and restore): owned threads in another environment, with an owner-qualified inventory and per-environment receipts.
- E. Temporary projects (feat(projects): hide temporary agent projects by default #761; web and desktop core only, remaining surfaces parked in draft Temporary projects: hide on remaining surfaces (parked) #766): owner and temporary marker on agent-registered projects, hidden by default, with a way to keep one. Removal at wrap-up is part of D.
- F. Worktrees for tasks in another environment. (feat(server): isolate remotely delegated tasks in worktrees #754)
- G. Agent guidance (docs(agents): teach agents the thread ownership vocabulary #768): the vocabulary above in the injected instructions and tool descriptions, with evals re-run.
Follow-ups carried from #749
- Backfill prompted batch-created threads that have no creation record, only where exact evidence exists.
- Revisit worktree suspension once new launches write the stored creator origin (part of B).
- Remove the unused historical evidence index in a later migration.
- Add coverage for pruned atomic launch receipts, conflicting scheduled-task markers, conflicting exact launch messages, and unpruned keyed creation records.
Activity
test(lastcode): fix ownership CI checks
fix(sidebar): keep the group icon beside the title
fix(server): fetch advertised branches for remote worktree bases
fix(lastcode): fit launch guidance in the agent context budget
fix(lastcode): classify explicitly top-level launches for suspension
feat(sidebar): style group thread titles
fix(sidebar): keep the group icon beside the title
test(server): serialize simulated Pause completion
fix(server): prepare remote worktrees outside peer requests
test(lastcode): compile the legacy ownership decoder once
fix(server): let destinations validate remote worktree bases
test(server): refresh the agent context budget
docs(server): trim remote worktree tool guidance
fix(threads): clear group markers in command decisions
refactor(lastcode): isolate launch ownership decisions
123 remaining items
fix(mcp): preserve the requested checkout in recovery
test(evals): verify the callback instruction and checkout
test(evals): use existing checks for refusal recovery
fix(ci): remeasure when a pull request changes base
fix(checkpoint): refresh the context snapshot after clean carry replay
docs(lastcode): explain clean and repaired checkpoint refreshes
fix(threads): surface archive consultation in tool discovery
fix(mcp): guide cross-project work to a local thread (#783)
feat(threads): show linked environments in the archive preview (#772)
fix(ci): measure agent context without changing the budget snapshot (#…
feat(threads): persist linked archive generations
feat(threads): plan exact archive cohorts on linked destinations
feat(threads): archive and restore owned work on linked machines (#786)
lastobelus commentedon Nov 20, 2026
All items are merged on
lastcode/main: A #752, B #753, C #762, D1 #763, D2 #764, D3 #771, D4 #772 and #786, E #761, F #754, G #768.Related changes that landed alongside:
delegate_task's refusal for another local project points to a launched thread.Not done, left as follow-ups:
Ownership is not retroactive: threads created before #753 keep their old placement and archive behaviour.