docs(persistence): record #2 spike findings (resume + git identity) #11

Closed
claude-desktop wants to merge 0 commits from boss/2 into main
Collaborator

Summary

Captures the decisions from the #2 timeboxed spike so #3 can start without re-litigating.

  • SDK resume: session_id read from SDKSystemMessage (subtype: 'init'); stored under ~/.claude/projects/<sanitized-cwd>/… — so resume is bound to the project dir, but the SDK treats git worktrees of the same repo as the same project bucket (exactly what the worktree design wants).
  • Git identity: option A — pass GIT_AUTHOR_* / GIT_COMMITTER_* via query({ env }). No per-worktree config file needed.
  • Git auth: URL rewrite via GIT_CONFIG_COUNT + url.<base>.insteadOf env injection. Token never touches .git/config and only lives in the query() child process env.

Spike code itself is throwaway per the acceptance criteria; only the decision doc is merged.

Closes #2.

Test plan

  • bunx tsc --noEmit — clean (no code changes)
  • bunx biome check src/ — clean
  • bunx biome format src/ — clean
  • bun test — 16 pass
  • Reviewer confirms the resume / identity / auth decisions are sound before #3 starts.
## Summary Captures the decisions from the #2 timeboxed spike so #3 can start without re-litigating. - **SDK resume:** `session_id` read from `SDKSystemMessage` (`subtype: 'init'`); stored under `~/.claude/projects/<sanitized-cwd>/…` — so resume is bound to the project dir, but the SDK treats git worktrees of the same repo as the same project bucket (exactly what the worktree design wants). - **Git identity:** option **A** — pass `GIT_AUTHOR_*` / `GIT_COMMITTER_*` via `query({ env })`. No per-worktree config file needed. - **Git auth:** URL rewrite via `GIT_CONFIG_COUNT` + `url.<base>.insteadOf` env injection. Token never touches `.git/config` and only lives in the `query()` child process env. Spike code itself is throwaway per the acceptance criteria; only the decision doc is merged. Closes #2. ## Test plan - [x] `bunx tsc --noEmit` — clean (no code changes) - [x] `bunx biome check src/` — clean - [x] `bunx biome format src/` — clean - [x] `bun test` — 16 pass - [ ] Reviewer confirms the resume / identity / auth decisions are sound before #3 starts.
docs(persistence): record spike findings for SDK resume + git identity
All checks were successful
qa / qa (pull_request) Successful in 44s
a9db68fdf4
Captures the decisions from the #2 spike so #3 can start without
re-litigating:

- SDK session_id is read from SDKSystemMessage (subtype 'init').
- Resume is local-filesystem only; worktrees of the same repo share a
  project bucket, so resume works across dispatches that land in
  different worktrees.
- Git identity: pass GIT_AUTHOR_*/GIT_COMMITTER_* via query({ env })
  instead of per-worktree config.
- Git auth: GIT_CONFIG_COUNT + url.<base>.insteadOf env injection, so
  the token never lands in .git/config.

Closes #2.
charles closed this pull request 2026-04-17 09:05:27 +00:00
All checks were successful
qa / qa (pull_request) Successful in 44s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
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
charles/claude-hooks!11
No description provided.