anomalyco / anomalyco/opencode

[FEATURE]: Add a transcript revision token for incremental consumers

Open
#43,766 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

[FEATURE]: Add a transcript revision token for incremental consumers

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Incremental consumers of session transcripts (e.g. external integrations that sync or archive conversations) currently cannot detect when a transcript they already read has changed. I hit this while developing an OpenCode session-sync plugin (related work in nowledge-co/community#522).

What exists today: the legacy and v2 session message endpoints both expose pagination cursors. Those cursors identify a message position and ordering, but there is no value that identifies the revision of the whole transcript. A client can keep paging from a cursor, but it cannot detect that OpenCode later changed or removed an earlier message or part. Compaction may also prune old tool-result content after a client has already read it.

Ask: expose a monotonic transcript revision (e.g. an ETag, revision number, or checkpoint token) with message-list responses, or via a dedicated endpoint. Incremental consumers could compare the revision and rescan only when previously read content changes.

I checked the legacy and v2 session message endpoints and could not find an existing revision/ETag/checkpoint API. I also found #19567 (durable event export / replay surface), which is related but distinct: that request is about an append-only event stream, while this one is a lightweight revision signal on the existing message-list surface.

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.

Research direction

Start by inspecting the legacy and v2 session message endpoints and how their pagination cursors are produced, then review how transcript changes and compaction affect returned messages. Define and document a monotonic revision, ETag, or checkpoint surface that incremental consumers can compare and use to trigger rescans when previously read content changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.