HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Tarquinen
opencode-dynamic-context-pruning
TypeScript2026–2026
Tarquinen / opencode-dynamic-context-pruning

opencode-dynamic-context-pruning

Dynamic context pruning plugin for OpenCode - intelligently manages conversation context to optimize token usage

4Distinct people
7Mentions
1Explicit recommenders
4.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Dynamic context pruning plugin for OpenCode - intelligently manages conversation context to optimize token usage

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I recommend that Opencode users try Dynamic Context Pruning as well: https://github.com/Opencode-DCP/opencode-dynamic-context-pru... It works great for long-horizon tasks, and…

bigyabai used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:24:10 PM UTC.

AI Users have workdays up to 90 min longer than non-users direct repository linkDebated

Participants debate whether AI users work longer hours due to increased productivity enabling more tasks or because of burnout, selection bias, and managerial pressure. Strong disagreements exist on whether the time increase reflects genuine efficiency gains or unhealthy overwork driven by tool design and corporate mandates.

27 readable replies · Supporting reply 1 · Supporting reply 2 · Supporting reply 3 · Supporting reply 4

Mentions over time

HN mentions by week7 dated mentions

Observed mentions: 2026-03-01 09:21:25 UTC to 2026-09-30 11:59:37 UTC. Weeks start Monday, UTC.

012026-02-23 00:00:00 UTC to 2026-03-02 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 232026-03-02 00:00:00 UTC to 2026-03-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-09 00:00:00 UTC to 2026-03-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-16 00:00:00 UTC to 2026-03-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-23 00:00:00 UTC to 2026-03-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-30 00:00:00 UTC to 2026-04-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-06 00:00:00 UTC to 2026-04-13 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-04-13 00:00:00 UTC to 2026-04-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-20 00:00:00 UTC to 2026-04-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-27 00:00:00 UTC to 2026-05-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-04 00:00:00 UTC to 2026-05-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-11 00:00:00 UTC to 2026-05-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-18 00:00:00 UTC to 2026-05-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-25 00:00:00 UTC to 2026-06-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-06-01 00:00:00 UTC to 2026-06-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-06-08 00:00:00 UTC to 2026-06-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJun 82026-06-15 00:00:00 UTC to 2026-06-22 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-06-22 00:00:00 UTC to 2026-06-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-06-29 00:00:00 UTC to 2026-07-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-06 00:00:00 UTC to 2026-07-13 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-13 00:00:00 UTC to 2026-07-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-20 00:00:00 UTC to 2026-07-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-27 00:00:00 UTC to 2026-08-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-03 00:00:00 UTC to 2026-08-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-10 00:00:00 UTC to 2026-08-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-17 00:00:00 UTC to 2026-08-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-24 00:00:00 UTC to 2026-08-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-31 00:00:00 UTC to 2026-09-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-07 00:00:00 UTC to 2026-09-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-14 00:00:00 UTC to 2026-09-21 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-09-21 00:00:00 UTC to 2026-09-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-28 00:00:00 UTC to 2026-10-05 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 28

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 232026-02-23 00:00:00 UTC2026-03-02 00:00:00 UTC101
Mar 22026-03-02 00:00:00 UTC2026-03-09 00:00:00 UTC000
Mar 92026-03-09 00:00:00 UTC2026-03-16 00:00:00 UTC000
Mar 162026-03-16 00:00:00 UTC2026-03-23 00:00:00 UTC000
Mar 232026-03-23 00:00:00 UTC2026-03-30 00:00:00 UTC000
Mar 302026-03-30 00:00:00 UTC2026-04-06 00:00:00 UTC000
Apr 62026-04-06 00:00:00 UTC2026-04-13 00:00:00 UTC101
Apr 132026-04-13 00:00:00 UTC2026-04-20 00:00:00 UTC000
Apr 202026-04-20 00:00:00 UTC2026-04-27 00:00:00 UTC000
Apr 272026-04-27 00:00:00 UTC2026-05-04 00:00:00 UTC000
May 42026-05-04 00:00:00 UTC2026-05-11 00:00:00 UTC000
May 112026-05-11 00:00:00 UTC2026-05-18 00:00:00 UTC000
May 182026-05-18 00:00:00 UTC2026-05-25 00:00:00 UTC000
May 252026-05-25 00:00:00 UTC2026-06-01 00:00:00 UTC101
Jun 12026-06-01 00:00:00 UTC2026-06-08 00:00:00 UTC000
Jun 82026-06-08 00:00:00 UTC2026-06-15 00:00:00 UTC000
Jun 152026-06-15 00:00:00 UTC2026-06-22 00:00:00 UTC101
Jun 222026-06-22 00:00:00 UTC2026-06-29 00:00:00 UTC000
Jun 292026-06-29 00:00:00 UTC2026-07-06 00:00:00 UTC000
Jul 62026-07-06 00:00:00 UTC2026-07-13 00:00:00 UTC101
Jul 132026-07-13 00:00:00 UTC2026-07-20 00:00:00 UTC000
Jul 202026-07-20 00:00:00 UTC2026-07-27 00:00:00 UTC000
Jul 272026-07-27 00:00:00 UTC2026-08-03 00:00:00 UTC000
Aug 32026-08-03 00:00:00 UTC2026-08-10 00:00:00 UTC000
Aug 102026-08-10 00:00:00 UTC2026-08-17 00:00:00 UTC000
Aug 172026-08-17 00:00:00 UTC2026-08-24 00:00:00 UTC000
Aug 242026-08-24 00:00:00 UTC2026-08-31 00:00:00 UTC000
Aug 312026-08-31 00:00:00 UTC2026-09-07 00:00:00 UTC000
Sep 72026-09-07 00:00:00 UTC2026-09-14 00:00:00 UTC000
Sep 142026-09-14 00:00:00 UTC2026-09-21 00:00:00 UTC101
Sep 212026-09-21 00:00:00 UTC2026-09-28 00:00:00 UTC000
Sep 282026-09-28 00:00:00 UTC2026-10-05 00:00:00 UTC101

What Hacker News says

7 sources
running local models, now with Qwen3.8-Flash-Next, they have 256k, but when they get up there their speed is just too slow. So i've taken https://github.com/Tarquinen/opencode-dynamic-context-prunin... and started improving it. It already worked well to get a lot of mileage out of just taking tool calls, code modifications, etc, and dumping them in favor of a summary. But they'd still inevitably get to long in the tooth, and context poisoning meant they'd just eventually not be able to stay in the preferred context size, which for me is 64k-128k. So, I extended it with an eviction command and required a ratio. So instead of a summary of work, it now just places a waypoint. The waypoint basically means the context has a semi-coherent context but without all the baggage. I'm on like day 3 of a single session with 3m tokens removed and still
Read the rest
in the sweet spot. So it evicts to beneath the lower limit, compresses to the upper limit, then evicts again. It's amazing how resilient it is if you give it a good plan. The work flow has basically been: 1. Write up an implementation document for some new set of features. 2. Rewrite the implementation as a TDD document 3. Set it to work. The only thing I haven't figured out is it likes to stop when it hits the finish line of the subparts, but likely we're going to end up with the master of puppets monitoring these things and just set them to evaluating what they've done.
In You Said No MCP
I don't really think you're making reasonable decisions at that size; but I suppose if you're not allowed to refactor it, maybe. I think the way these models work excludes sane behaviors the larger the context gets as each token introduces potential ambiguities between "USER" and "SYSTEM" messages leading to all the catastrophic behaviors. Anyway, with AMD395+ I'm finding ~100k is both speed and context usefulness unless it's scoped tightly. with opencode, I manage it with dynamic context pruning: https://github.com/Opencode-DCP/opencode-dynamic-context-pru... ; then anything I touch ends up being refactored so context doesn't get bloated with unecessary functions, etc. Obviously, this isn't compatible with certain business codebases, so I can see why bloat meets bloat.
In Running local models is good now

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.