Skip to content

docs(ecosystem): add opencode-prune-images to plugins - #48096

Closed
Sugamsss wants to merge 1 commit into
anomalyco:devfrom
Sugamsss:docs-prune-images
Closed

Sugamsss wants to merge 1 commit into
anomalyco:devfrom
Sugamsss:docs-prune-images

Conversation

@Sugamsss

@Sugamsss Sugamsss commented Sep 9, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #48095

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds opencode-prune-images to the community plugins table in
packages/web/src/content/docs/ecosystem.mdx.

During long agent runs, especially visual QA loops with Playwright or Chrome
DevTools, chats can collect many screenshots. The plugin changes only the
outgoing context before provider dispatch. It keeps the newest images within a
count budget (7 by default) and a cumulative estimated wire Base64 budget (16
MiB by default). Older images become compact text cards with the path, nearby
context, and best-effort recall guidance. During compaction, recognized images
are converted to cards so raw image data is not passed to the compaction
context. Persisted SQLite history is not rewritten.

Repository:
https://github.com/Sugamsss/opencode-prune-images

The plugin reduces payload pressure but cannot guarantee that every provider or
gateway will accept every request. Provider limits and the rest of the request
still apply. The repository is source-only and is not currently published to
npm.

How did you verify your code works?

Verified that the markdown table format matches the existing entries in
ecosystem.mdx. The plugin repository has 17 passing tests and a passing strict
TypeScript check. The tests cover image count and payload budgets, nested tool
results, V1 tool attachment pruning, rolling cache behavior, compaction,
malformed input, duplicate cards, and plugin hook registration.

Screenshots / recordings

N/A (documentation addition)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@Sugamsss

Copy link
Copy Markdown
Author

Small update from my side: since opening this, the plugin fixed pruned V1 tool attachments breaking downstream shapes (entries now leave the array and their cards join the tool output), covered by a new regression test. Suite is 17 pass with strict typecheck clean. Happy to rebase or adjust the entry wording whenever convenient.

@Sugamsss

Sugamsss commented Sep 22, 2026 •

Copy link
Copy Markdown
Author

@rekram1-node Would you have a moment to review this ecosystem addition when convenient? It adds opencode-prune-images, an in-memory context manager that keeps sessions from bricking on provider image caps (#47487). Fully rebased on latest dev with all checks green. Happy to adjust anything.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@Sugamsss

Copy link
Copy Markdown
Author

Superseded by #55058 with fresh rebase on latest dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In-memory rolling window for images to reduce 413 and too-many-images errors

1 participant