anomalyco / anomalyco/opencode

v2: selective session-content deletion is missing again after #48043

Open
#48,090 6 comments 2 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Sep 9, 2026.

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

Description

Description

This follows up on #44984, which remains closed even though its replacement API has now been removed.

CodeNomad 0.20.0 adopted that API. We still need a supported way to remove selected tool/reasoning content from ongoing sessions without deleting the conversations themselves.

Expected behavior: A native, constrained operation to remove selected technical content while preserving session identity, useful history, and consistency across clients.

There are two needs: freeing model-context capacity and reducing retained history/storage, including a supported way to reclaim unused database space.

Actual behavior:

  • V1 supported selective part deletion.
  • #44984 requested its V2 equivalent.
  • #45015 supplied session.messageUpdate; the issue was closed as resolved.
  • #48043 removed it without an equivalent replacement.

Context hooks can filter model input, but do not clean stored history. Deleting whole sessions after N days is not a substitute: our workflows involve hundreds of parallel, long-lived sessions whose meaningful history must remain available.

OpenCode owns the database schema, migrations, session execution, and synchronization. Safe mutation of that storage belongs in OpenCodeÔÇönot in downstream clients writing directly to its tables.

If arbitrary message replacement is too broad, please provide a narrower prune/redact operation. What concrete invariant prevents selective deletion of completed technical content, and why can that concern not be addressed with restrictions rather than removal?

Could you restore the capability temporarily, or reopen #44984 and track a replacement before treating the V1 use case as resolved? We are happy to help validate it.

OpenCode version

First affected published beta: 0.0.0-beta-19365 (@opencode/cli, published 2026-09-09).

Steps to reproduce
  1. Open an existing session containing completed tool/reasoning blocks.
  2. Attempt to remove selected blocks through session.messageUpdate.
  3. The endpoint and generated client method are gone, with no equivalent selective-deletion operation.
Screenshot and/or share link
Operating System

Windows 11.

Terminal

CodeNomad 0.20.0 development; diagnostic commands run in PowerShell 7.

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.