worktree finish: exit 1 on merge conflicts leaves no merge to resolve #1154
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1154
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
worktree finishexits 1 withMerge conflicts in:but leaves no merge in progress. The os:worktree skill tells the orchestrator to resolve the conflicts and run finish again. No conflicted files exist to resolve, so the skill step is not possible.Observed
On 2026-10-19 the session finished branch
tooling-crc-placement. Another session had mergedticket-1143into main (0cd8943e) after the branch started. Both the branch and main had added one History row to the end ofdocs/implementation-status/os-sdlc.md.After the exit,
git status --shortwas empty in the main checkout and in the worktree. The worktree file had no conflict markers.Reproduce
Origin
worktree finish tooling-crc-placement, session abfbc12c, 2026-10-19git merge mainin the worktree, resolved the conflict by hand, committed, then ran finish again. Finish fast-forwarded and exited 0.plugins/os/skills/worktree/SKILL.mdexpects an open merge for exit 1 ← DESIGN (worktree CLI finish)worktreeCLI finish command andplugins/os/skills/worktree/SKILL.mdfinish step 3VERDICT: CREATE
Occurrence: os: worktree finish reports merge conflicts and exits 1 but leaves no merge open
Seen: plugins/os/bin/worktree finish, fast-batch-14 on 2026-10-25; main had moved (ticket-1315 merge
59f6cdb0) past the batch basea830d451Run: session b0b47602-97a4-4f51-a9b8-54b228fc3ed3
Adds: second occurrence; the conflict was in docs/implementation-status/os-backlog.md History table (two rows, one per branch). Workaround again: git merge main inside the worktree, resolve, commit, rerun finish (fast-forward, exit 0). The case is 'base moved' (exit 2 in the SKILL.md table) but the CLI reports the exit-1 message.
From #1589 port check: NOT FIXED. Integration#refusal runs merge_dry_run and returns :conflicts (plugins/os-git/lib/os_git/integration.rb:277-281). Outcome.refused prints 'Merge conflicts in: ...' to stdout and exits 1 (plugins/os-git/lib/os_git/worktree/finish/outcome.rb:21-22, command.rb:305). The dry run starts no merge, so no merge is open in either checkout, as before. Not closed.
Correction to the last comment: the verdict stands (not fixed), but the line reference was wrong. The code is plugins/os-git/lib/os_git/integration.rb:54-58 (moved_base).