Skip to content

(MOT-3874) feat(harness): worktree-isolated spawns + GPT-family code prompt#413

Closed
ytallo wants to merge 2 commits into
feat/coder-apply-patchfrom
feat/harness-code-gpt-worktrees
Closed

(MOT-3874) feat(harness): worktree-isolated spawns + GPT-family code prompt#413
ytallo wants to merge 2 commits into
feat/coder-apply-patchfrom
feat/harness-code-gpt-worktrees

Conversation

@ytallo

@ytallo ytallo commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

feat(shell): coder::worktree-add / coder::worktree-remove

Git worktree lifecycle for isolated sub-agent workspaces: worktree-add
creates .worktrees/ on branch wt/ from the effective root's
HEAD (fs_scope-aware, name-validated, requires a git work tree);
worktree-remove is clean-only — uncommitted changes keep the worktree
in place and are reported dirty, and the wt/ branch is deleted
only when fully merged so unlanded child work survives for the caller
to merge. Catalog grows to 13.

feat(harness): worktree-isolated spawns + GPT-family code prompt

  • spawn options gain isolation: "worktree" (dispatch path): the child
    gets its own git worktree via coder::worktree-add before seeding, its
    fs_scope root points at it, and the worktree rides the parent's call
    checkpoint. On child completion (including sweep-expired children,
    which route through the same deliver path) the harness removes the
    worktree clean-only and appends a disposition note to the parent's
    result: merge wt/, inspect a dirty tree, or nothing to do.
  • code mode selects a per-family identity: openai/openai-codex route to
    prompts/code-gpt.txt (apply_patch edit discipline); openai-codex now
    maps to the Gpt prompt family. Both code prompts gain a delegation
    section (spawn + worktree isolation + merge guidance).
  • code_mode_policy adds harness::spawn to the native surface.

Refs MOT-3874

ytallo added 2 commits July 5, 2026 17:59
Git worktree lifecycle for isolated sub-agent workspaces: worktree-add
creates .worktrees/<name> on branch wt/<name> from the effective root's
HEAD (fs_scope-aware, name-validated, requires a git work tree);
worktree-remove is clean-only — uncommitted changes keep the worktree
in place and are reported dirty, and the wt/<name> branch is deleted
only when fully merged so unlanded child work survives for the caller
to merge. Catalog grows to 13.
- spawn options gain isolation: "worktree" (dispatch path): the child
  gets its own git worktree via coder::worktree-add before seeding, its
  fs_scope root points at it, and the worktree rides the parent's call
  checkpoint. On child completion (including sweep-expired children,
  which route through the same deliver path) the harness removes the
  worktree clean-only and appends a disposition note to the parent's
  result: merge wt/<name>, inspect a dirty tree, or nothing to do.
- code mode selects a per-family identity: openai/openai-codex route to
  prompts/code-gpt.txt (apply_patch edit discipline); openai-codex now
  maps to the Gpt prompt family. Both code prompts gain a delegation
  section (spawn + worktree isolation + merge guidance).
- code_mode_policy adds harness::spawn to the native surface.
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview, Comment Jul 6, 2026 11:41am
workers-tech-spec Ready Ready Preview, Comment Jul 6, 2026 11:41am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d2bb154-8c59-446b-80ea-1ed6dd033177

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/harness-code-gpt-worktrees

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 32 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@ytallo

ytallo commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #423.

@ytallo ytallo closed this Jul 6, 2026
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