Skip to content

delegate_task: run tracked tasks in another local project - #427

Merged
shuv1337 merged 12 commits into
mainfrom
feat/local-cross-project-delegate
Nov 9, 2026
Merged

shuv1337 merged 12 commits into
mainfrom
feat/local-cross-project-delegate

Conversation

@shuv1337

@shuv1337 shuv1337 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

delegate_task rejected a local target.projectId different from the parent's. Using t3_thread_launch instead lost task tracking, cancellation, and completion wakes.

Change

A different local project now receives an ordinary child thread tracked by the parent's durable task, using the existing RemoteDelegation record/follow/wake lifecycle with local thread services. No peer link or linked-environments setting is required. Same-project delegation is unchanged. Worktree isolation starts from the target repository's HEAD, excluding uncommitted changes. Archived target projects remain allowed, matching t3_thread_launch.

Opus findings addressed

Finding Fix Commit
#1 Same-environment delegatedFrom children participate in approval propagation; browser coverage verifies a notification opens the parent, not the hidden child. 98eb99781c
#2 Local ordinary children expose pending questions/approvals; waits subscribe to child events and return early. 676c6d8aa0
#3 Retries reuse the existing first run's workspace preparation, preserving worktree isolation. 410bb58141
#4 Replace Local with the target project title (label-only option; client on/in copy is unchanged). fd53830b3d
#5 Clearly report that the target is not a Git repository with a commit; no Scratch-specific behavior added. 71228a460b
#6 decision Document that archived targets stay allowed. 34fa25a109
#7 Remove redundant capabilities text, reduce its context budget, and move the eval to orchestration.ndjson. db07af7a29
#8 Refresh server, ChatView, and RemoteDelegation lifecycle comments. be695e03a9
#9 Integration tests cover runtime/interaction escalation refusal, inactive parent, target-project provider disablement, and stopping a launched child when recording fails. 914f3d82f8

Verification

  • Reproduced [Feature]: [UX] Terminal style history for chat input text field. #1 (state and browser notification), Add Windows titlebar breathing room #2 (question and approval), and fix(server): enumerate OpenCode V2 skills #3 with failing regressions before their fixes.
  • Touched test files: 141 passed across 6 files (threadShell, notification coordinator browser tests, OrchestratorMcpService, RemoteDelegation, project handlers, and AgentContextBudget).
  • vp run check:changed: passed — format, lint, both knip checks, GraphQL codegen, typecheck for 37 affected packages, 293 tests across 18 files, and the affected React compiler check.
  • Integration coverage also preserves async wake, completion waits, cancel, retry idempotency, restart recovery, missing-project rejection, same-project behavior, and target-repository worktree isolation.
  • Tool-use eval: orchestration case-file dry-run passed, including delegate-local-other-project. Live evals were not run: this host has no Anthropic key or vibeproxy.
  • Context trim (2955bd396b): measured MCP tool-list JSON is 49,064 bytes, down from 49,295 and 11 bytes below main's 49,075. The budget test supplies the measured numbers; this checkout has no budget generator. Shortened projectId and isolation descriptions retain local-project selection, target-repo HEAD worktrees, and the cross-environment worktree restriction; removed redundant delegation prose. System-append budgets are unchanged.
  • No dev server was launched by this implementation sub-agent; an integrated real-client pass remains for the parent agent.

Kept as a draft; no merge or release.

Review fixes implemented by GPT-6 Astra in pi (shuvpi).

@shuv1337
shuv1337 marked this pull request as ready for review November 9, 2026 22:05
@shuv1337
shuv1337 merged commit 30e776d into main Nov 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant