Skip to content

Collect Claude Code and opencode sessions - #15

Merged
gustmrg merged 1 commit into
feat/collect-githubfrom
feat/collect-sessions
Oct 21, 2026
Merged

gustmrg merged 1 commit into
feat/collect-githubfrom
feat/collect-sessions

Conversation

@gustmrg

@gustmrg gustmrg commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Stacked on #14. This diff only shows the new commit.

Summary

Adds sources for coding agent sessions, which capture work that never becomes a commit, such as investigation and debugging.

Changes

  • claude-code reads Claude Code's transcripts ($CLAUDE_CONFIG_DIR/projects or ~/.claude/projects), including subagent files
  • opencode lists sessions through the opencode CLI for the repositories under collect.git.roots, since its storage format changes between versions, and splits them by day from the exported message times
  • Each session becomes one entry per day with its time window, repository, branch, title, and prompt count
  • Prompts and replies are never stored
  • Claude Code records the branch with each message; for opencode it comes from the reflog at the session's start
  • Both sources run by default and skip on devices without the tool

Verification

  • go test ./... (transcript and CLI fixtures)
  • Dry-run against real Claude Code and opencode sessions

The claude-code source reads Claude Code's transcripts and the opencode
source lists sessions through the opencode CLI, whose JSON stays stable
while its storage moves between databases. Each session becomes one entry
per day with its time window, repository, branch, title, and prompt
count. Prompts and replies are never stored.

Claude Code records the branch with each message; for opencode it comes
from the reflog at the session's start. Both sources run by default and
skip on devices without the tool.
@gustmrg
gustmrg force-pushed the feat/collect-sessions branch from d16dd12 to 797abe7 Compare October 21, 2026 01:08
@gustmrg
gustmrg added this pull request to stack #18 October 21, 2026 01:12
@gustmrg
gustmrg merged commit 72b9c98 into main Oct 21, 2026
2 checks passed
@gustmrg
gustmrg deleted the feat/collect-sessions branch October 21, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant