GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - KirillDeviatka/opencode-session-diff-spill

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 

Repository files navigation

opencode-session-diff-spill

OpenCode plugin that bounds and spills oversized message.summary.diffs so long agent sessions do not blow up RSS / SQLite / Jetsam.

This is a local mitigation. The durable fix belongs in OpenCode core (packages/opencode session summary + event encode). See docs/UPSTREAM.md.

Problem

OpenCode re-embeds full-file patches into user message.summary.diffs on every step-finish, then appends full message.updated.1 snapshots to an event log. One session reached ~136MB/message and ~6.2GB of events → ~87GiB opencode RSS → macOS Jetsam.

Related upstream: anomalyco/opencode#32005.

Install (global OpenCode)

# clone
git clone https://github.com/KirillDeviatka/opencode-session-diff-spill.git
# link into global plugins (auto-loaded from ~/.config/opencode/plugins/)
ln -sf "$(pwd)/src/session-diff-spill.ts" ~/.config/opencode/plugins/session-diff-spill.ts

Or copy the file. Restart opencode / the desktop shell that hosts it.

Optional offline DB repair (quit OpenCode first):

node scripts/sanitize-session-diffs.mjs --dry-run --prune-events
node scripts/sanitize-session-diffs.mjs --apply --prune-events --session ses_...

What the plugin does

Hook Behavior
experimental.chat.messages.transform Deny vendor/.node-runtime/build paths; cap per-file (64KB) and total (512KB) patch bodies before LLM
event Detect fat message.updated; spill JSON under ~/.local/share/opencode/session-diff-spill/
experimental.chat.system.transform Short reminder + new-chat alert when spill volume is huge

What it cannot do

  • Stop SessionSummary.computeDiff write-path
  • Stop append-only full-info message.updated.1 rows in event

Those need an engine PR (see UPSTREAM.md).

Smoke

npm run smoke

License

MIT

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.