worktree commands leave recoverable state after a 600-second git timeout #1613

Closed
opened 2026-11-06 19:49:43 +00:00 by jared · 1 comment
Owner

Problem

worktree start and worktree finish run git merge and git worktree add with a 600-second timeout. When git passes the timeout, the command kills it and leaves half-done state. A rerun does not behave like the first run.

Observed

Source: design audit of #1589 (plugins/os-git/lib/os_git/backend/cli/checkouts.rb:21).

  1. A merge killed in worktree start leaves staged files and no MERGE_HEAD. A rerun exits 1.
  2. A merge with a slow post-merge hook lands, but the command exits 1. A rerun exits 0.
  3. A killed worktree add stays registered without links. A rerun exits 1.
    No case loses work.

Reproduce

n/a: needs a git command that runs past 600 seconds; found by design audit.

Approach

Required work: none beyond the acceptance criteria.

Origin

  • Trigger: design audit of #1589
  • Improvised this session: none
  • Chain: rerun exits differ or fail ← git killed at the LONG_RUN timeout leaves partial state ← DESIGN (plugins/os-git/lib/os_git/backend/cli/checkouts.rb:8,20,36)
  • Root candidate: none found; searched LONG_RUN, 600 second timeout, checkouts.rb, MERGE_HEAD, worktree add, os_git
  • Where: plugins/os-git/lib/os_git/backend/cli/checkouts.rb:21
  • Session: 5b14a4ef-91b2-45c0-a729-baa17682a39a
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/5b14a4ef-91b2-45c0-a729-baa17682a39a.jsonl

VERDICT: CREATE

## Problem `worktree start` and `worktree finish` run git merge and `git worktree add` with a 600-second timeout. When git passes the timeout, the command kills it and leaves half-done state. A rerun does not behave like the first run. ## Observed Source: design audit of #1589 (`plugins/os-git/lib/os_git/backend/cli/checkouts.rb:21`). 1. A merge killed in `worktree start` leaves staged files and no MERGE_HEAD. A rerun exits 1. 2. A merge with a slow post-merge hook lands, but the command exits 1. A rerun exits 0. 3. A killed `worktree add` stays registered without links. A rerun exits 1. No case loses work. ## Reproduce n/a: needs a git command that runs past 600 seconds; found by design audit. ## Approach Required work: none beyond the acceptance criteria. ## Origin - Trigger: design audit of #1589 - Improvised this session: none - Chain: rerun exits differ or fail ← git killed at the LONG_RUN timeout leaves partial state ← DESIGN (plugins/os-git/lib/os_git/backend/cli/checkouts.rb:8,20,36) - Root candidate: none found; searched LONG_RUN, 600 second timeout, checkouts.rb, MERGE_HEAD, worktree add, os_git - Where: plugins/os-git/lib/os_git/backend/cli/checkouts.rb:21 - Session: 5b14a4ef-91b2-45c0-a729-baa17682a39a - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/5b14a4ef-91b2-45c0-a729-baa17682a39a.jsonl VERDICT: CREATE
Author
Owner

Resolution

Done: Closed without code by ruling 97 (os-me predict, 81). The three cases come from a design audit of a git merge or worktree add that runs past 600 seconds; none has happened. Each case fails loudly (exit 1) and none loses work, so a cleanup step for a timeout would be speculative hardening.

Evidence: Ruling 97 in docs/decisions/rulings.tsv (main ae8dea297); precedent cases.md line 64 (#897: failing loudly is enough for a never-seen failure); plugins/os-git/lib/os_git/backend/cli/checkouts.rb LONG_RUN is 600 s on purpose.

Follow-ups: none

## Resolution **Done:** Closed without code by ruling 97 (os-me predict, 81). The three cases come from a design audit of a git merge or worktree add that runs past 600 seconds; none has happened. Each case fails loudly (exit 1) and none loses work, so a cleanup step for a timeout would be speculative hardening. **Evidence:** Ruling 97 in docs/decisions/rulings.tsv (main ae8dea297); precedent cases.md line 64 (#897: failing loudly is enough for a never-seen failure); plugins/os-git/lib/os_git/backend/cli/checkouts.rb LONG_RUN is 600 s on purpose. **Follow-ups:** none <!-- os-backlog kind: resolution -->
jared closed this issue 2026-11-09 17:56:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1613
No description provided.