Skip to content

feat(core): Implement V0 Episodic Context Manager#24643

Draft
joshualitt wants to merge 4 commits intomainfrom
jl/context-manager-v0
Draft

feat(core): Implement V0 Episodic Context Manager#24643
joshualitt wants to merge 4 commits intomainfrom
jl/context-manager-v0

Conversation

@joshualitt
Copy link
Copy Markdown
Contributor

  • Re-wrote the monolithic string-based context manipulation logic into an elegant, immutable Episodic IR pipeline.
  • Implemented four non-destructive degradation processors: HistorySquashingProcessor, ToolMaskingProcessor, BlobDegradationProcessor, and SemanticCompressionProcessor.
  • Added dynamic configuration knobs (budget and strategies) to precisely tune the retention algorithms.
  • Implemented a power-user incrementalGc flag for maximum context preservation beneath the ceiling.
  • Enforced strict typing across the new pipeline, replacing unsafe casts with robust mapping interfaces.

Fixes #24642

@joshualitt joshualitt force-pushed the jl/context-manager-v0 branch from 3299b10 to f66b294 Compare April 3, 2026 21:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Size Change: +16.7 kB (+0.05%)

Total Size: 34 MB

Filename Size Change
./bundle/chunk-DJ3KCY7M.js 0 B -14.8 MB (removed) 🏆
./bundle/chunk-I64H5SQM.js 0 B -3.15 MB (removed) 🏆
./bundle/core-5QYYRYFK.js 0 B -45.2 kB (removed) 🏆
./bundle/devtoolsService-I5PFXSEG.js 0 B -28.4 kB (removed) 🏆
./bundle/interactiveCli-RGAWM3SE.js 0 B -1.64 MB (removed) 🏆
./bundle/oauth2-provider-5PSMK5YW.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-4PSXRUG5.js 3.15 MB +3.15 MB (new file) 🆕
./bundle/chunk-LPBBYB2O.js 14.8 MB +14.8 MB (new file) 🆕
./bundle/core-WAYSDJSX.js 45.2 kB +45.2 kB (new file) 🆕
./bundle/devtoolsService-H4GDXOZT.js 28.4 kB +28.4 kB (new file) 🆕
./bundle/interactiveCli-LQNLF4MU.js 1.64 MB +1.64 MB (new file) 🆕
./bundle/oauth2-provider-7BGSMCLE.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-GFUOVHXW.js 1.96 MB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/gemini.js 552 kB +181 B (+0.03%)
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-ACCRGPX3.js 980 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B

compressed-size-action

@gemini-cli gemini-cli bot added the area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality label Apr 3, 2026
@joshualitt joshualitt force-pushed the jl/context-manager-v0 branch 3 times, most recently from 76f34ff to 2e943c0 Compare April 3, 2026 23:31
@joshualitt joshualitt force-pushed the jl/context-manager-v0 branch from 2e943c0 to 0e3549f Compare April 4, 2026 21:16
- Re-wrote the monolithic string-based context manipulation logic into an elegant, immutable Episodic IR pipeline.
- Implemented four non-destructive degradation processors: `HistorySquashingProcessor`, `ToolMaskingProcessor`, `BlobDegradationProcessor`, and `SemanticCompressionProcessor`.
- Added dynamic configuration knobs (`budget` and `strategies`) to precisely tune the retention algorithms.
- Implemented a power-user `incrementalGc` flag for maximum context preservation beneath the ceiling.
- Enforced strict typing across the new pipeline, replacing unsafe casts with robust mapping interfaces.
- Added `powerUserProfile` to support features for those wanting a bit
  more quality at the cost of tokens.
@joshualitt joshualitt force-pushed the jl/context-manager-v0 branch 3 times, most recently from b9623e4 to 5e87177 Compare April 5, 2026 16:40
@joshualitt joshualitt force-pushed the jl/context-manager-v0 branch from 5e87177 to d0fa985 Compare April 5, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Land context manager and context IR

1 participant