Repository navigation
feat(server): spawn threads into another project - #126
Conversation
Agent work on this PREstimated cost $0.00 · 0 responses · 70 sessions · 4.1 h wall time
Flags: 34 human corrections · 51 large tool outputs · 3 permission requests · 11 repeated commands · 2 repeated failures · 16 repeated reads · 9 repeated skill loads · 70 sessions with usage bound to no task Details: snapshot, prices, coverage, counters
Token counters by model (native counter semantics; never added across semantics): Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.
Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown. Local measurement from native records; usage totals are not billing. Updated in place by |
|
What: Independent review found no blocking issue in PR #126. Independent review verdict: no blockers on exact head Reviewed the complete ten-file candidate diff and relevant consumers. Confirmed the provider launch resolves cwd from the spawned thread's target project/worktree; the target project settings drive local/worktree placement and setup scripts run with the target project root and worktree; Prism kit selection remains sourced from the caller project; default runtime mode remains full access and explicit runtimeMode is preserved; child reportback and interruption retain parent-linked IDs across projects and restart restoration; top-level IDs are not classified as subagents and are sidebar-visible; list/read/message/interrupt support explicit project scope while omitted selectors preserve existing behavior. Proof inspected: reported exact-head focused run passed 16 cases (15 spawn cases plus cross-project settlement; 59 skipped), server TypeScript check, targeted lint, diff check and fork provenance check all passed. I did not rerun those already-valid checks. Actual target AGENTS.md transcript and installed-desktop child/top-level acceptance remain coordinator-owned; no browser or live app was used. |
|
What: Independent review found no blocking issue on PR #126's current head. Cumulative verdict: no blockers for PR head Cumulative scope checked: GitHub compare reports the original base as merge base, with the PR two commits ahead and one commit behind live main. Its cumulative candidate contains ten paths: the nine server/test paths plus For live-main compatibility, #124's web changes do not touch the server spawn, setup, project-scope or provider-launch paths. The shared Proof reuse: the candidate's reported focused spawn/settlement tests and typecheck/lint remain applicable to unchanged backend code; the reported |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Merged by the coordinator as 6f56eb9 (squash) at verified head e740c6c: diff read, CI green on that head, |
What: Agents can spawn child or top-level threads in another project in the same environment.
Why: Spawning inherited the caller's project and workspace, preventing Drafters from working in a target Satrapy.
So what: This PR closes #114 when merged; the coordinator reviews it and performs the remaining installed desktop acceptance. No merge is authorized here.
Closes #114. Parent #113. Advances the Objective's requirement that Drafters start in any project as children or top-level threads.
spawn_threadaccepts optionalprojectId,mode: child | top-level, andruntimeMode. Explicit target placement resolves the target's local/worktree preference, including non-repository and unborn-HEAD fallback. New worktrees reuse the project setup runner with sync/async semantics and visible failure activities. Caller Prism kits remain the routing source. Cross-project child reportback and interruption remain available through children scope. Top-level threads use ordinary sidebar-visible IDs and no parent/reportback; follow-up tools acceptprojectIdwithscope: project. Calls without selectors keep existing behavior.Elon record
Requirements and who asked: The user and #114 require target project placement/instructions, child reportback/interrupt, top-level sidebar/read/message, runtime mode and target workspace preference.
Deleted: Cross-environment placement, per-target Prism policy, creator-access metadata, extra dispatchers, parallel writers, and #122 parent-stop expansion.
Bottleneck: Spawn placement and follow-up project scope, plus setup behavior before actual provider launch.
Checked myself: Read #114/#113 and full inherited diff, inspected real provider cwd resolution and sidebar subagent filters, verified clean base/live origin/main; focused tests exercise real engine/projections/provider reactor at a fake provider boundary.
Current delivery state
Ready for human review: current-head CI and cumulative independent review passed. Installed acceptance remains coordinator-owned. The original Test Server 2 run exposed
src/mcp/alwaysLoad.test.ts:35:32,AssertionError: expected 776 to be less than 600. Commite740c6c7cc4357573d5af3bb2f56a4049c22240cshortens only the description to 509 characters, retaining required wording and field documentation without relaxing the test.pnpm exec vp test run apps/server/src/mcp/alwaysLoad.test.ts: 2 passed; touchedvp lintand servertsc --noEmitexited 0;git diff --checkpassed. Prior backend behavior and its proof inputs are unchanged. Current-head CI passed Check, Test, all three server shards, Rust, Release Smoke and Fork Stack Model. No failed or pending checks remain; optional jobs skipped.Proof and review
e740c6c7cc4357573d5af3bb2f56a4049c22240c; base0db8b3f19549ef369a611883e111ae20760364c8.pnpm exec vp test run apps/server/src/mcp/toolkits/threads/spawnIntoProject.test.ts apps/server/src/orchestration/ThreadSettlementReactor.test.ts -t 'spawn into another project|settled cross-project child': 16 passed, 59 skipped. Covers 15 spawn cases and cross-project settlement.OrchestrationCommandInvariantError: Orchestration command invariant failed (project.create): Active project 'project-threads' already exists for workspace root .... Distinct target roots fixed the fixtures and the final 16-case command proves them; 51 passing tests in the six unchanged files remain valid.pnpm exec tsc --noEmit --project apps/server/tsconfig.json --pretty false: exit 0 on final commit, two existing suggestions.pnpm exec vp lint apps/server/src/mcp/toolkits/threads/handlers.ts apps/server/src/mcp/toolkits/threads/tools.ts apps/server/src/mcp/toolkits/threads/spawnWorkspace.ts apps/server/src/mcp/toolkits/threads/spawnSetup.ts apps/server/src/mcp/toolkits/threads/spawnIntoProject.test.ts apps/server/src/mcp/toolkits/threads/handlers.testFixtures.ts apps/server/src/mcp/toolkits/threads/roles.test.ts apps/server/src/mcp/toolkits/threads/childUsageLimitResume.test.ts apps/server/src/orchestration/ThreadSettlementReactor.test.ts: exit 0.git diff --check: passed.node scripts/fork-features.mjs check:fork-features: OK (19 features).Error: All fibers interrupted without errorwas corrected by keeping the fiber in the surrounding scope through settlement. Earlier message fixture errorAssertionError: expected 'Independent reply.' to contain 'Follow up.'was corrected by requiring the delivered message to exist without assuming timestamp order.sub.sub.sub.46b03420-8643-4703-8756-8602f14b39fb.dispatcher-b307e728dc20.dispatcher-cf11ceba5ed3.reviewer-e026cb63c976(Prism-selected GPT-6-Luna / Codex): no blockers on current head.review/independent: successposted bylukemaj; compatibility with live main93bcc9b57fd1520cddc3944952d6a8fea1beaec3checked, no material interaction. The cumulative ten-file diff is reviewed against intended main; live-base movement from original0db8b3fto93bcc9bcame from fix(web): open Issue links beside their thread #124, with only disjoint feature entries sharingdocs/fork-features.md. No rebase was needed or performed. Prior original-base full review and unchanged backend proof reused; fresh prompt regression/lint/typecheck prove the one-line repair.sub.sub.sub.46b03420-8643-4703-8756-8602f14b39fb.dispatcher-b307e728dc20.dispatcher-cf11ceba5ed3.worker-e5b9f300c5aa.Agent Observer sync and publish succeeded: cost comment. Measurement attribution gap: 0 attributed responses and 67 unbound sessions despite 2,733 excluded responses. This is missing task attribution, not a measured $0 task cost; no Observer repair is in scope.
Assumptions and remaining acceptance
AGENTS.mdtranscript, installed desktop child reportback/interrupt and top-level sidebar/read/message remain for the fleet coordinator after merge. Browser/computer use was not authorized; no pairing token or live app/state was touched.Implemented and coordinated with GPT-6.1-Sol through the Codex harness; independently reviewed with GPT-6-Luna through the Codex harness, selected by Prism.