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 — Compacted tool results keep stored output in long sessions · Issue #16786 · anomalyco/opencode

Compacted tool results keep stored output in long sessions #16786

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Compacted tool results keep stored output in long sessions#16786
Copy link
Assignees
kitlangton

Description

@honeyspoon
honeyspoon
opened on Mar 9, 2026
Issue body actions

Description

When a completed tool result is marked compacted, OpenCode later treats that tool result as cleared when rebuilding model messages, but the stored state.output text remains populated in session state.

In long-running sessions with large tool outputs, this means old tool result content can still be carried around after compaction has logically hidden it.

Plugins

None

OpenCode version

Current dev

Steps to reproduce

  1. Run a long single-session workload with repeated large tool outputs.
  2. Let session.compaction mark older tool parts as compacted.
  3. Inspect stored tool parts and observe that state.output is still present even though compacted parts are rendered as cleared later.

Screenshot and/or share link

N/A

Operating System

macOS

Terminal

Ghostty

Activity

  1. github-actions
    assigned
    thdxr
    on Mar 9, 2026
  2. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    perfIndicates a performance issue or need for optimization
    on Mar 9, 2026
  3. github-actions commented on Mar 9, 2026

    @github-actions
    github-actionsBot
    on Mar 9, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Memory leak: compacted tool outputs and attachments not cleared from storage #7420 / Compacted tool outputs and attachments not cleared from storage, causing memory growth #7421: Both describe the same root cause — compacted tool output strings not being cleared from storage after compaction marks parts as pruned. These were closed but the underlying issue may have recurred.
    • High memory usage and database bloat in long-running OpenCode instances #16729: Also identifies "Compaction marks parts but keeps full data" as a root cause of database bloat in long-running instances.

    If your issue is distinct from these (e.g. it's a regression or a different code path), please add a note clarifying the difference.

  4. thdxr
    assigned
    kitlangton
    and unassigned
    thdxr
    on Apr 26, 2026
  5. thdxr
    removed
    perfIndicates a performance issue or need for optimization
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 4, 2026

    @github-actions
    github-actionsBot
    on Jul 4, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  7. github-actions
    closed this as not plannedon Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kitlangton
    kitlangton

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.