Found during the 0.9.18 issue audit: tryQuerySessionTokens selects model_id from the session table (src/providers/sqlite-session-parser.ts:48) but the real OpenCode schema names the column model, so the fallback query throws against a real opencode.db. It only fires when per-message parsing yields zero tokens, which is why #675's fix works regardless, but the fallback is dead as written. One-line query fix plus a schema-accurate fixture test.
Found during the 0.9.18 issue audit: tryQuerySessionTokens selects model_id from the session table (src/providers/sqlite-session-parser.ts:48) but the real OpenCode schema names the column model, so the fallback query throws against a real opencode.db. It only fires when per-message parsing yields zero tokens, which is why #675's fix works regardless, but the fallback is dead as written. One-line query fix plus a schema-accurate fixture test.