Skip to content

a-change-runs-in-its-own-worktree: a change in its own worktree runs there - #874

Merged
VeryComplexAndLongName merged 4 commits into
mainfrom
a-change-runs-in-its-own-worktree
Oct 10, 2026
Merged

VeryComplexAndLongName merged 4 commits into
mainfrom
a-change-runs-in-its-own-worktree

Conversation

@VeryComplexAndLongName

Copy link
Copy Markdown
Owner

Summary

The owner's run of a HppMCP change from its card (2026-10-10) failed at its first stage:

cwd "C:/Prog/.worktrees/HppMCP/mcp-platform-foundation" is outside the workspace "c:\Prog\HppMCP"

Every agent was bound to the open workspace, and the chain, a single stage and a card's run controls chose an agent by its id alone — so every run in a change's own worktree was refused, in both hosts (openspec/changes/a-change-runs-in-its-own-worktree).

  • core: runRootOf / agentsByRunRoot — a run inside one of the repository's worktrees (<worktree root>/<repository>/<dir>) gets that worktree's own agents, made once; any other run the workspace's, whose sandbox still refuses it.
  • HarnessChainDeps.resolveRunner(agentId, cwd?); the editor's AI panel, chain and card run controls, and the standalone server's chain and socket runs pass the run's cwd.
  • The editor's run dialog reads and writes the change's harness where the change is worked (before: the checkout's copy).

Test plan

  • typecheck, lint (0 errors)
  • core run-root 3 + chain runner; extension unit tests; server 110
  • openspec validate --strict; merge gate names only 4.3 open
  • e2e in CI
  • 4.3 Human-only: Run Change... on a worktree card in HppMCP runs its stages

🤖 Generated with Claude Code

…there

Run Change... on the card of a change worked in its own worktree failed at
its first stage: "cwd .../.worktrees/HppMCP/mcp-platform-foundation is
outside the workspace c:\Prog\HppMCP". Every agent was bound to the open
workspace, and the chain, a single stage and a card's run controls chose
an agent by its id alone.

- core: runRootOf and agentsByRunRoot - a run inside one of the
  repository's worktrees gets that worktree's own agents, made once; any
  other run the workspace's, whose sandbox still refuses it.
- The chain runner asks for a stage's agent with its cwd; the editor's AI
  panel and run controls, and the standalone server's chain and socket
  runs, do the same.
- The editor's run dialog reads and writes the change's harness where the
  change is worked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VeryComplexAndLongName
VeryComplexAndLongName merged commit 27ba9e3 into main Oct 10, 2026
10 checks passed
@VeryComplexAndLongName
VeryComplexAndLongName deleted the a-change-runs-in-its-own-worktree branch October 10, 2026 15:25
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