anomalyco / anomalyco/opencode
v2: selective session-content deletion is missing again after #48043
@kitlangton is already working on this.
Since Sep 9, 2026.
- 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
- Open an existing session containing completed tool/reasoning blocks.
- Attempt to remove selected blocks through
session.messageUpdate. - The endpoint and generated client method are gone, with no equivalent selective-deletion operation.
Screenshot and/or share link
- Original report: https://github.com/anomalyco/opencode/issues/44984
- Replacement API: https://github.com/anomalyco/opencode/pull/45015
- Removal: https://github.com/anomalyco/opencode/pull/48043
Operating System
Windows 11.
Terminal
CodeNomad 0.20.0 development; diagnostic commands run in PowerShell 7.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.