Skip to content

fix(parser): support OpenCode V2 message projections - #1647

Draft
yaner-here wants to merge 1 commit into
kenn-io:mainfrom
yaner-here:feature/opencode-v2-projection
Draft

fix(parser): support OpenCode V2 message projections#1647
yaner-here wants to merge 1 commit into
kenn-io:mainfrom
yaner-here:feature/opencode-v2-projection

Conversation

@yaner-here

Copy link
Copy Markdown

Fixes #1642

Adds support for OpenCode V2 sessions stored in the session_message projection table. The parser now handles user/assistant/tool/compaction/... messages, including model and token usage data, while keeping support for the legacy OpenCode V1 format. And it works fine on my computer.

image

@roborev-ci

roborev-ci Bot commented Sep 7, 2026

Copy link
Copy Markdown

roborev: Combined Review (c19eaf2)

Verdict: One medium-severity issue found in OpenCode V2 projection parsing.

Medium

  • internal/parser/opencode_projection.go:126-129 — Projection parsing drops OpenCode’s global-project worktree="/" fallback, emitting an empty Cwd for sessions with an empty or root directory. Apply the same root-worktree fallback used by parseOpenCodeDBSession.

Reviewers: 2 done | Synthesis: codex, 7s | Total: 9m20s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

OpenCode 2.0 parser fails because of new event-sourced SQLite schema

1 participant