Skip to content

feat: isolate project agent threads in worktrees - #6

Merged
oscarlehuu merged 2 commits into
mainfrom
agent/thread-worktree-orchestration
Jul 30, 2026
Merged

feat: isolate project agent threads in worktrees#6
oscarlehuu merged 2 commits into
mainfrom
agent/thread-worktree-orchestration

Conversation

@oscarlehuu

Copy link
Copy Markdown

Summary

  • give every non-DM top-level task/thread its own ACP queue, session, control, and typing identity while preserving the real NIP-29 channel for relay/UI operations
  • create one deterministic Git worktree per Project thread and reuse it across explicit agent handoffs
  • keep the normal Slack-style composer: the first ordered agent runs, later named agents remain reference-only until explicitly handed off in the thread
  • preserve exact conversationId and turnId for cancel/model-switch controls so simultaneous same-channel turns can be controlled independently

Safety

  • freeze workspace authority to the trusted owner-authored thread root, including after Project relinks
  • fail closed when workspace metadata, root lookup, repository validation, or provisioning fails; never fall back to the shared source checkout
  • deterministic branch/worktree identity derives from the immutable root event ID, not raw prompt text
  • channel-only control fallback refuses ambiguous multi-thread routing

Verification

  • full just ci passed
  • buzz-acp: 651 unit tests + 9 lifecycle tests passed
  • desktop: 3873 passed, 1 gated live-relay test skipped, 0 failed
  • focused browser E2E: 62 boot, composer, mention, messaging, and thread-anchor scenarios passed
  • reviewer and independent tester cleared Project-relink, same-channel concurrency, exact cancel, and truthful model-switch edge cases
  • local macOS arm64 NuncioCrew Local.app built, ad-hoc signed, and passed strict codesign verification

Related

Signed-off-by: oscarlehuu <oscar.lehuu@gmail.com>
Signed-off-by: oscarlehuu <oscar.lehuu@gmail.com>
@oscarlehuu
oscarlehuu merged commit 9285142 into main Jul 30, 2026
5 checks passed
@oscarlehuu
oscarlehuu deleted the agent/thread-worktree-orchestration branch July 30, 2026 17:04
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