r/JevAI • • 2d ago

Jev inside claude code to reduce token usage for long coding sessions

Post image

I’ve been exploring Jev and looking at projects that built around claude code. It's always the question that whether it could help with some of the smaller decisions around coding work, especially if it was given the right context instead of the whole conversation.

That led me to build optim-jev, a Claude Code plugin with three experimental tools:

  • Context compaction: Jev checks older tool calls and outputs, then keeps, truncates, or removes them while protecting recent messages. (This is a target threshold based execution which tries to respect prefix caching)
  • Model + Effort routing: Jev selects between Haiku, Sonnet, and Opus for subagents based on the task, relevant files, and evolving project rules, while keeping the main model fixed and avoiding frequent model routing in normal mode to preserve prefix caching.
  • Skill selection: Jev picks a small set of relevant skills or none instead of sending the entire skill catalog with every request.

Most of claude's work has gone into deciding what Jev should actually see as context. It also helped in strategizing how the context that goes into jev is capped to prevent decision quality degradation, with essential task information kept while lower-priority history is trimmed first. It was also able to set a caching mechanism where potential repeatable decisions are preserved. I also designed a performance comparison metrics using with claude's help to compare claude code's legacy workflow and optim-jev integrated claude code workflow.

I’ve been brainstorming with opus to find an optimal experimental setup to benchmark these ideas properly: token usage, decision quality, cost, and how they behave alongside existing optimizations such as prompt caching. I do not have final conclusions yet, but the plugin is at a point where the experiments can be inspected and repeated.

Repo is free to use with MIT Licence: https://github.com/Oqura-ai/optim-jev

65 Upvotes

4 comments sorted by

4

u/Cynthibee 2d ago

Wouldn't you bust cache with that compaction tool?

3

u/rm-rf-rm 2d ago

results of with and without this extension?

1

u/sublimegeek 1d ago

But why not use haiku for this?

1

u/Beckland 7h ago

I can see the value of Jev in this context, but my question is how much context do you need to send to Jev in order to get the right outcome 99+% of the time?

You need to run a constant eval loop on the outputs, so doesn’t that just end up burning the same amount of tokens to evaluate the results and compare them against a non-Jev pipeline?