Description
When Claude Code sessions are started outside the normal pre-commit hook flow — for example, when Partio wasn't enabled at session start, when the agent was launched from a parent directory before the repo was initialized, or when a session ran without triggering the pre-commit hook — users have no way to retroactively link those sessions to their commits.
Add a partio attach command that accepts a session ID and optional commit hash, then creates a checkpoint on the partio/checkpoints/v1 branch linking the session to that commit.
partio attach <session-id> # link to HEAD
partio attach <session-id> <commit-hash> # link to specific commit
Source: entireio/cli changelog 0.5.3 (entire attach command, PR #688/#743)
Acceptance Criteria
partio attach <session-id> links a previously untracked session to the most recent commit
partio attach <session-id> <commit-hash> links the session to the specified commit
- Command validates that the session ID exists in the local sessions directory
- Command creates a checkpoint on the orphan branch linking session to commit
- Command fails gracefully with a helpful error if the session or commit is not found
- Command is idempotent: re-attaching an already-linked session updates rather than duplicates
Context Hints
cmd/partio/ — add new attach command
internal/checkpoint/ — checkpoint creation logic
internal/agent/claude/ — session discovery and JSONL parsing
internal/session/ — session lifecycle types
internal/git/ — git operations for commit amendment
Description
When Claude Code sessions are started outside the normal pre-commit hook flow — for example, when Partio wasn't enabled at session start, when the agent was launched from a parent directory before the repo was initialized, or when a session ran without triggering the pre-commit hook — users have no way to retroactively link those sessions to their commits.
Add a
partio attachcommand that accepts a session ID and optional commit hash, then creates a checkpoint on thepartio/checkpoints/v1branch linking the session to that commit.Source: entireio/cli changelog 0.5.3 (
entire attachcommand, PR #688/#743)Acceptance Criteria
partio attach <session-id>links a previously untracked session to the most recent commitpartio attach <session-id> <commit-hash>links the session to the specified commitContext Hints
cmd/partio/— add newattachcommandinternal/checkpoint/— checkpoint creation logicinternal/agent/claude/— session discovery and JSONL parsinginternal/session/— session lifecycle typesinternal/git/— git operations for commit amendment