You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RunResult.commits includes host commits when the branch moves during a merge-to-head run #1362
Found by the weekly verify on 2026-11-01, on main@0460513 (reverify-branch-strategies). The code is the same at 15e2c34.
What happens
With the merge-to-head strategy, if the host branch gains commits while the run is in flight, RunResult.commits lists those host commits and the merge commit, not only the agent's commits. Commits are collected as baseHead..HEAD after the merge (src/SandboxLifecycle.ts:543-544), but src/run.ts:462 documents the field as the agent's commits.
Repro
Start run() with merge-to-head and an agent that commits once. While it runs, commit to the host branch. Then inspect result.commits.
Acceptance
commits contains only commits the agent made, whatever happens to the host branch during the run.
A test moves the host branch mid-run.
This issue was AI-generated (Claude Code) on behalf of @mattpocock.
Activity