anomalyco / anomalyco/opencode

OpenChamber transcript hides new messages in sessions created before 1.18.16

Open
#42,609 2 comments 1 reaction 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Environment: opencode 1.18.16 (upgraded from 1.18.15), OpenChamber 1.18.3 web UI (Home Assistant add-on).

Symptom: In sessions that existed before the 1.18.16 upgrade, new messages no longer appear at the end of the transcript. The transcript appears to end at the last pre-upgrade message; new questions/answers are effectively invisible. Sessions created after the upgrade work fine.

Data is intact — GET /session/{id}/message returns every message including the newest, so this is a client-side ordering problem, not data loss.

Root cause (confirmed against real data): opencode's message-ID generation changed in 1.18.16. Through 1.18.15 IDs were a monotonic sequence (msg_f7… → msg_ff…) so string order equalled chronological order. Starting 1.18.16 new IDs are msg_00…-prefixed. OpenChamber's transcript store sorts and merges messages by message-ID string comparison (the J6/Q6 comparators and gb/nL/eL/tL/X6 helpers in the web bundle), with eL/tL doing binary-search insertion keyed on ID. For any session containing both ID namespaces, string order is 00… < f7… < ff…, so new messages sort to the top of the transcript and the visible "end" stays at the last pre-upgrade message.

Example: a 314-message session spanning the upgrade — the actual newest message (created the day after the upgrade) sorts to index 50 of 314, and the bottom of the transcript shows content from the day before.

Suggested fix: order transcript messages by time.created (falling back to ID for ties) instead of message-ID string order, or keep message IDs monotonic/backward-compatible across releases so ID order remains chronological.

Plugins

Home Assistant add-on

OpenCode version

1.18.16

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

HAOS

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.