shipwithjev

Catalog / Agents & browsers

0197GitHub

codex-context-diet

A Codex plugin where Jev trims bulky tool results.

konstantinosbotonakis/codex-context-dietREADME ↗
# Context Diet

Codex re-reads its whole desk before every reply. This plugin keeps the pages that still matter and clears the ones you can reprint.

<img src="assets/context-diet.jpg" alt="Two panels. On the left a desk is buried under a tall pile of printed pages. On the right the same desk holds one page and two sticky notes" width="100%">

A Codex plugin that asks TypeSafe's [Jev](https://typesafe.ai/) which bulky tool results the session still needs, then replaces the rest with a bounded head and a one-line note.

Long sessions fill up with tool output. Test logs, build noise, large file reads, MCP payloads. Once a result lands in the transcript, Codex re-sends it on every later request until compaction summarises it away. Compaction runs after the context is already bloated. This plugin works at the moment the result is produced.

## Why you'd install it

- **You don't change how you work.** No new commands, no habits. Install it, click trust once, forget it.
- **Your long sessions stay sharp.** This matters most in the sessions that go on for an hour with lots of commands. That's where the desk would otherwise be buried.
- **It rarely makes you wait.** It only looks at big outputs, roughly a page and a half of dense text and up. Small stuff it ignores completely, and that costs you nothing.

## How it works

1. `PostToolUse` fires after a tool produces output. The adapter reads one JSON payload on stdin.
2. Results are left alone when they are small, come from `apply_patch`, name a tool in `neverDietTools`, or arrive as the first result of a session.
3. Everything else goes to Jev in one request carrying five literal questions, and the answer decides.
4. When the body is stale, Codex replaces the tool result with the first `truncateHeadChars` characters and a not

Also filed under Agents & browsers

  1. 0295

    Flight search with Browser Use

    Breaking: Browser Use + Jev = Ultrafast ⚡ Findings flights took 7s and cost only $0.0039 🤯 > new action space every step > DOM state space > small LLM fallback to type (this video is at 1x speed btw) Built a tiny open source browser agent. try it below ↓

    @gregpr07 · Agents & browsers · ~$0.004 · ~7 s

  2. 0500

    Jev: AI Decisions as a Typed Function Call | StackToHeap

    # Jev: AI Decisions as a Typed Function Call What I learned using TypeSafe's Jev for code review, and why its more surprising uses are browser control and generative UI.…

    stacktoheap.com · Agents & browsers

  3. 0319

    x-scanner

    Chrome extension that labels every post you scroll past on X with six typed questions per post, and counts what it costs in the corner.

    oso95 · Agents & browsers

  4. 0318

    Vibe Check for X

    Chrome extension that scores draft posts and reply context before posting; optional media descriptions come from a separate vision model.

    RafalWilinski · Agents & browsers