Skip to content

Commit 2344020

Browse files
committed
planning: add issue fix-work-agent-skip-active-locks to 2.1
fix work-agent to skip non-stale locked issues and find next available issue
1 parent 83c1be1 commit 2344020

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"status" : "open"
3+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Plan
2+
3+
## Goal
4+
5+
Update work-agent to skip non-stale locked issues and find the next available issue automatically,
6+
silently. work-prepare should expose a `stale: bool` field in its ERROR response (based on
7+
IssueLock.STALE_LOCK_THRESHOLD = 4 hours), so work-agent can decide whether to skip or offer cleanup
8+
without duplicating the threshold.
9+
10+
When work-prepare returns ERROR with an existing worktree locked by another session:
11+
- If `stale == false` (lock_age_seconds < 14400): work-agent silently retries work-prepare to find
12+
the next available issue, without presenting any AskUserQuestion dialog
13+
- If `stale == true` (lock_age_seconds >= 14400): work-agent preserves the existing cleanup-offer
14+
behavior (Clean up and retry / Abort)
15+
16+
## Pre-conditions
17+
18+
(none)
19+
20+
## Post-conditions
21+
22+
- [ ] Bug fixed: work-agent no longer offers cleanup when encountering a non-stale locked issue
23+
- [ ] work-agent automatically retries work-prepare to find the next available issue when it receives
24+
ERROR with `stale == false`, without presenting any AskUserQuestion dialog
25+
- [ ] work-prepare ERROR response (existing worktree locked by another session) includes a boolean
26+
`stale` field, set to `true` when `lock_age_seconds >= 14400`, `false` otherwise
27+
- [ ] Staleness threshold sourced exclusively from `IssueLock.STALE_LOCK_THRESHOLD` in Java — no
28+
hardcoded `14400` appears in skill Markdown code
29+
- [ ] Regression test added: work-agent skips non-stale locked issues and finds next available issue
30+
- [ ] Regression test added: work-agent preserves the cleanup-offer behavior when `stale == true`
31+
- [ ] No new issues introduced
32+
- [ ] E2E verification: reproduce the scenario (work-prepare returns ERROR with `stale == false`) and
33+
confirm work-agent automatically finds the next available issue without any dialog

0 commit comments

Comments
 (0)