My Inspiration
I´m an AI Consultant from Germany and I use different LLMs to help clients, but also to build stuff for myself. Because I have the $20 ChatGPT Plan for many years, I´ve thought what about making it more useful for me? So I´ve started researching for methods to optimize the token usage, tool calls and everything else. A few weeks later I´ve got my first good results with ContextGuard and then I´ve kept going.
What it´s for
ContextGuard is working locally on your computer as a plugin inside Codex. It helps to produce the same results as without it, but with fewer tokens, commands and less wasted context.
Large command output is kept local, it gives Codex a compact evidence, reuses facts and avoids unnecessary inspections and roundtrips. Everything is preserved locally (failures, warnings, security signals and validation evidence).
Just instal it in Codex marketplace. Then setup it in a new or old project with a skill which initializes the project-local capture runner and starts managing guidance.
How I built it
I´ve started the work on ContextGuard with GPT-5.5 but I hit the limits of possible optimization. After GPT-5.6 came out I´ve started working again on it with the Sol model. All my tests are also with Sol.
Using GPT-5.6 Sol inside Codex:
- analyzing how 5.6 works
- build an zero-roundtrip workflow (was a nice suggestion by Sol)
- improved benchmarks with real Codex usage in CLI´s and pricing
- ran isolated RAW-versus-ContextGuard experiments with the same repository, task, model, reasoning level, permissions
Codex helped me a lot with finding new ways to improve, test them, sometimes start again because it got worse, but in the end finding a new way to scale the improvement feels awesome :D
Results
ContextGuard reduced:
- total tokens from 389,814 to 164,797 - 57.72% fewer;
- shell commands from 13 to 5 - 61.54% fewer;
- standard API-cost equivalent from $0.629986 to $0.365395 - 42.00% lower;
- completion time from 227.095 seconds to 154.260 seconds - 32.07% faster.
Checked with 144 hidden tests.
Savings vary by task, repository, workflow, and model behavior!
Challenges
I´ve learned a lot about tokens and how it all works on real use-cases. In the end it´s not just about scalling down the tokens, but to find out how else you can adjust the whole process to have a real optimization on everyday tasks.
What I am proud of
The jump from 5.5 to 5.6 Sol was crazy. I´ve worked with less iterations so much faster and it felt like really talking with an expert about this topic to find new ways of optimization. Somehow like science project, but you don´t know what the final result will be...
What's next
I would like to experiment more on this topic, because I think this is the main reason why AI is not used that much. Imagine doing 2x more work with the same Codex subscription, which means you can do more /goals and /loops and just play around more, instead of saving every prompt to just finish your product.
ContextGuard was build by me (Eugen Giminger) and uploaded and presented by Giminger Consulting (my freelance AI Consulting business).
Log in or sign up for Devpost to join the conversation.