Tracking: persistent workdirs and sessions #10

Closed
opened 2026-04-16 22:45:57 +00:00 by claude-desktop · 1 comment
Collaborator

Purpose

Tracks the milestone "Persistent workdirs and sessions". Replaces per-task mkdtemp + git clone with a cache clone plus per-(agent, branch) worktree, and persists Claude Agent SDK session ids per (agent, repo, issue) so re-dispatches resume their prior conversation instead of starting fresh.

Each story carries a ## Dependencies footer with its direct edges; this issue owns the full tree.

Dependency graph

Layer 0 — de-risk
  #2  Spike: SDK resume + git identity strategy ........ ✅

Layer 1 — workdir cache
  #3  Workdir module .................................. ✅ PR #13
  #4  Cleanup webhooks ................................ ✅ PR #12

Layer 2 — integration
  #5  runAgent integration ............................ ✅ PR #14

Layer 3 — sessions
  #6  Sessions store + resume ......................... ← next up

Layer 4 — housekeeping (parallel once #6 lands)
  #7  Daily expiration sweeper ........................ <-- #6
  #9  Admin /reset endpoint ........................... ✅ PR #16

  Dashboard observability (parallel once #5 lands)
  #8  Dashboard disk-usage card ....................... ✅ PR #15

PR stacking strategy

Same convention as the peon repo: a downstream story branches off the upstream story's branch and targets it as the PR base, so work parallelises while the upstream PR is still in review. When the upstream merges to main, the downstream PR is rebased and retargeted at main.

Branch naming: issue-<N>-<slug>.

  • Wave 1 (de-risk): #2 done
  • Wave 2 (parallel): #3 (after #2), #4 done
  • Wave 3: #5 done
  • Wave 4: #6 — ← next
  • Wave 5 (parallel on top of #6): #7 (#9 done)
  • Side-quest (parallel from Wave 3 onward): #8 done

Critical path: #2 → #3 → #5 → #6 → #7.

Decisions log

Spike (#2) output lands here as comments. Key decisions to capture:

  • Where session_id lives in the SDK message stream
  • Whether resume requires the original cwd
  • Git identity: env vars (option A) vs. extensions.worktreeConfig (option B)
  • Git auth: GIT_ASKPASS vs. URL rewrite vs. credential helper
  • Cache clone strategy: --filter=blob:none vs. --depth=N

Out of scope for this milestone

  • Per-agent disk-usage breakdown on the dashboard (#8 ships the headline number only)
  • Authentication on admin endpoints (#9 inherits whatever exists)
  • Skill prompt content quality tuning for the resume case (#6 only enforces the delta-vs-full split)
  • Session sharing across agents (sessionKey includes agent name on purpose)
## Purpose Tracks the milestone "Persistent workdirs and sessions". Replaces per-task `mkdtemp + git clone` with a cache clone plus per-(agent, branch) worktree, and persists Claude Agent SDK session ids per (agent, repo, issue) so re-dispatches resume their prior conversation instead of starting fresh. Each story carries a `## Dependencies` footer with its direct edges; this issue owns the full tree. ## Dependency graph ```text Layer 0 — de-risk #2 Spike: SDK resume + git identity strategy ........ ✅ Layer 1 — workdir cache #3 Workdir module .................................. ✅ PR #13 #4 Cleanup webhooks ................................ ✅ PR #12 Layer 2 — integration #5 runAgent integration ............................ ✅ PR #14 Layer 3 — sessions #6 Sessions store + resume ......................... ← next up Layer 4 — housekeeping (parallel once #6 lands) #7 Daily expiration sweeper ........................ <-- #6 #9 Admin /reset endpoint ........................... ✅ PR #16 Dashboard observability (parallel once #5 lands) #8 Dashboard disk-usage card ....................... ✅ PR #15 ``` ## PR stacking strategy Same convention as the peon repo: a downstream story branches off the upstream story's branch and targets it as the PR base, so work parallelises while the upstream PR is still in review. When the upstream merges to `main`, the downstream PR is rebased and retargeted at `main`. Branch naming: `issue-<N>-<slug>`. ## Recommended execution order - **Wave 1 (de-risk):** #2 — ✅ done - **Wave 2 (parallel):** #3 (after #2), #4 — ✅ done - **Wave 3:** #5 — ✅ done - **Wave 4:** #6 — ← next - **Wave 5 (parallel on top of #6):** #7 (#9 ✅ done) - **Side-quest (parallel from Wave 3 onward):** #8 — ✅ done Critical path: `#2 → #3 → #5 → #6 → #7`. ## Decisions log Spike (#2) output lands here as comments. Key decisions to capture: - Where `session_id` lives in the SDK message stream - Whether `resume` requires the original `cwd` - Git identity: env vars (option A) vs. `extensions.worktreeConfig` (option B) - Git auth: `GIT_ASKPASS` vs. URL rewrite vs. credential helper - Cache clone strategy: `--filter=blob:none` vs. `--depth=N` ## Out of scope for this milestone - Per-agent disk-usage breakdown on the dashboard (#8 ships the headline number only) - Authentication on admin endpoints (#9 inherits whatever exists) - Skill prompt content quality tuning for the resume case (#6 only enforces the delta-vs-full split) - Session sharing across agents (sessionKey includes agent name on purpose)
Author
Collaborator

Closing: milestone complete. All children resolved — #6 (sessions store), #7 (sweeper), #3/#4/#5 (workdir + cleanup + runAgent), #8 (dashboard), #9 (admin reset) all landed. Sessions + worktrees have been live since 2026-04-17 and are in daily use across boss/dev/reviewer.

Closing: milestone complete. All children resolved — `#6` (sessions store), `#7` (sweeper), `#3`/`#4`/`#5` (workdir + cleanup + runAgent), `#8` (dashboard), `#9` (admin reset) all landed. Sessions + worktrees have been live since 2026-04-17 and are in daily use across boss/dev/reviewer.
Sign in to join this conversation.
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
charles/claude-hooks#10
No description provided.