Spike: validate Claude SDK resume + pick git identity strategy #2

Closed
opened 2026-04-16 22:43:39 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a backend developer, I want a short timeboxed spike that validates session resumption with the Claude Agent SDK and pins down our git identity + auth approach, so that Phase 1 design choices are de-risked before we touch runAgent.

Acceptance criteria

Claude SDK resume probe

  • Identify which SDKMessage variant carries session_id (likely system.init or result); document the access path
  • Verify a second query({ resume: id, prompt, ... }) continues the prior conversation (model recalls prior turn)
  • Verify whether resume requires the same cwd or works with a different one
  • Verify the failure mode when the resumed session has expired or been purged server-side (error vs. silently new session)
  • Verify token cost on resume (does the SDK re-send full history, or just delta?)

Git identity strategy decision

  • Compare two options:
    • (A) Pass GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL / GIT_COMMITTER_NAME / GIT_COMMITTER_EMAIL via SDK query({ env })
    • (B) Enable extensions.worktreeConfig on the cache clone + per-worktree .git/config.worktree
  • Decide which to adopt; record reasoning

Git auth strategy decision

  • Compare options:
    • GIT_ASKPASS script that echoes the per-agent token
    • URL rewrite via -c url.<base>.insteadOf=...
    • Per-repo credential.helper
  • Decide; ensure the chosen approach does not write the token into .git/config

Output

  • Decisions captured as a comment on the tracking issue (or docs/decisions/persistence.md), referencing this spike
  • Code spike kept on a throwaway branch — not merged

Out of scope

  • Implementation of the workdir module (covered by the next story)
  • Any user-facing change

References

  • Claude Agent SDK: @anthropic-ai/claude-agent-sdk query() signature
  • Spec discussion: chat history, "session + worktree persistence" thread

Dependencies

  • Blocked by: none
  • Blocks: #3
  • Branch off: main (throwaway spike; not merged)
  • Full graph: #10
## User story As a **backend developer**, I want a short timeboxed spike that validates session resumption with the Claude Agent SDK and pins down our git identity + auth approach, so that Phase 1 design choices are de-risked before we touch `runAgent`. ## Acceptance criteria ### Claude SDK `resume` probe - [ ] Identify which `SDKMessage` variant carries `session_id` (likely `system.init` or `result`); document the access path - [ ] Verify a second `query({ resume: id, prompt, ... })` continues the prior conversation (model recalls prior turn) - [ ] Verify whether `resume` requires the same `cwd` or works with a different one - [ ] Verify the failure mode when the resumed session has expired or been purged server-side (error vs. silently new session) - [ ] Verify token cost on resume (does the SDK re-send full history, or just delta?) ### Git identity strategy decision - [ ] Compare two options: - **(A)** Pass `GIT_AUTHOR_NAME` / `GIT_AUTHOR_EMAIL` / `GIT_COMMITTER_NAME` / `GIT_COMMITTER_EMAIL` via SDK `query({ env })` - **(B)** Enable `extensions.worktreeConfig` on the cache clone + per-worktree `.git/config.worktree` - [ ] Decide which to adopt; record reasoning ### Git auth strategy decision - [ ] Compare options: - `GIT_ASKPASS` script that echoes the per-agent token - URL rewrite via `-c url.<base>.insteadOf=...` - Per-repo `credential.helper` - [ ] Decide; ensure the chosen approach does not write the token into `.git/config` ### Output - [ ] Decisions captured as a comment on the tracking issue (or `docs/decisions/persistence.md`), referencing this spike - [ ] Code spike kept on a throwaway branch — not merged ## Out of scope - Implementation of the workdir module (covered by the next story) - Any user-facing change ## References - Claude Agent SDK: `@anthropic-ai/claude-agent-sdk` `query()` signature - Spec discussion: chat history, "session + worktree persistence" thread ## Dependencies - **Blocked by:** none - **Blocks:** #3 - **Branch off:** `main` (throwaway spike; not merged) - **Full graph:** #10
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#2
No description provided.