A 64-character string kept 25 MB alive.
That bug, plus 3 more, killed Cloudflare Worker isolates under long coding agent sessions. One isolate death took 64 requests with it.
18 days later:
→ killed requests per hour: 35.2 → 0
→ hot path moved to Rust + Wasm: −55% CPU, −77% memory
→ a 9-point checklist for heavy request bodies on Workers
Everything we got wrong is in the post too.
context-mode.com/blog/worker…
@Cloudflare @CloudflareDev
context-mode.com/blog/worker…
Context Mode retweeted
This free plugin makes Claude Code last 10x longer per session
A Playwright snapshot eats 56 KB. 20 GitHub issues eat 59 KB. One access log, 45 KB
30 minutes in and 40% of your context is GONE
Then the agent compacts and forgets which files it was editing, what tasks were open, and what you last asked for
Context Mode kills this problem completely. 31K stars on GitHub, used by teams at Google, Meta, Microsoft, NVIDIA and Stripe
What it does:
• Runs tool output in a sandbox. Only the result enters context. 315 KB becomes 5.4 KB. A 98% cut
• Saves every file edit, task, error and decision to a local SQLite database. After compaction your agent picks up exactly where it left off
• Makes the agent write one script instead of reading 47 files. 700 KB becomes 3.6 KB
• Works on 17 platforms. Claude Code, Codex, Cursor, Gemini CLI, Copilot, OpenCode and more
Setup takes 30 seconds:
/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode
Restart Claude Code and you're done
Longer sessions. Sharper agent. A fraction of the tokens
If you code with agents every day, install this before anything else
github.com/mksglu/context-mo…
Context Mode retweeted
6 GitHub repos that actually reduce Claude Code token waste:
1. Context Mode – github.com/mksglu/context-mo…
2. claude-mem – github.com/thedotmack/claude…
3. Caveman – github.com/JuliusBrussee/cav…
4. XERJ – github.com/xerj-org/xerj
5. Claude Code MCP – github.com/anthropics/claude…
6. Orca – github.com/stablyai/orca
Bookmark this before your next long session
Context Mode retweeted
7 GitHub repos that turn Claude Code into a stronger research and writing agent:
1. Context Mode – github.com/mksglu/context-mo…
2. XERJ (local search for agents) – github.com/xerj-org/xerj
3. Orca (parallel agents) – github.com/stablyai/orca
4. Claude Code MCP – github.com/anthropics/claude…
5. Matt Pocock’s Skills – github.com/mattpocock/skills
6. Code Modernization – github.com/anthropics/code-m…
7. Claude Code Ultimate Guide – github.com/anthropics/claude…
Bookmark this and stop researching alone
Context Mode retweeted
Replying to @contextmode
@contextmode is #3 on GitHub Trending today!
Thank you to everyone contributing code, reporting issues, and spreading the word.🫡
Context Mode retweeted
Someone built a plugin that cuts AI coding token usage by up to 98%
Context Mode filters massive tool outputs before they reach your agent, reducing context waste while preserving searchable session memory across long coding tasks.
Setting up in Claude Code:
1. /plugin marketplace add mksglu/context-mode
2. /plugin install context-mode@context-mode
3. Restart and run /context-mode:ctx-doctor to check the hooks are live
Repo: github.com/mksglu/context-mo…
Every @contextmode account starts with the same default rules:
ASD-STE100, the controlled English of aircraft maintenance manuals. Plus Orwell's 6 rules from 1946.
Short answers. No wall of text. Code and terms stay exact.
Write your own once. Every agent follows them.
Context Mode retweeted
Yeah, it’s the same idea as a PreToolUse hook but it doesn’t live in the client. Protect sits on the request path, sees every call from Claude Code and Codex before it runs, strips wrappers like sudo or sh -c, and blocks based on what the call actually does. Blocked calls never reach the shell. Local hooks are easy to miss or bypass. This is one policy at the gateway for both agents on every machine. @contextmode
Rough one, glad prod was safe.
The part that stuck with me: the agent "saved a rule for itself." That rule lives inside the model. We put ours one hop before the command runs, so a destructive migration needs your OK first, not an apology after.
This is exactly why we built @contextmode Protect.
The model said it best: "I saved a rule for myself." A rule the model keeps for itself is a suggestion.
Protect puts the rule outside the model. Commands like `prisma migrate`, `DROP`, `db reset` or anything touching production get checked before they run, whatever the agent decides.
Your agent can be sorry. Or it can be stopped.
Long coding sessions fill the context window, and the agent compacts at a moment you didn't choose. Early decisions get lost.
Active Context turns that into a setting. Pick a limit once (200K, 500K or 1M). Context Mode keeps every thread under it and archives older turns word for word, so nothing is lost and your own messages are never shortened.
One setting covers every agent and every machine.
Ask your coding agent about a big data file and it pastes the whole file into the prompt. You pay for every byte.
Thinking in Code flips it: the agent writes a short script, the script reads the file, and the model only sees the answer.
64% lower cost on Claude Haiku 4.5. Same correct answers.
context-mode.com/thinking-in…
Your coding agent talks to the model with nobody in between.
We put one @Cloudflare Worker in the middle:
→ it folds big tool output before you pay for it
→ it remembers across Claude, Codex and machines
→ it stops risky commands before they run
Dynamic Workers, Durable Objects, Workers AI, Containers. One hop.
Watch the whole machine run 👇
A coding agent starts each session with what its client loads, and nothing more. Memory in @contextmode takes short facts from your turns, stores each one with two clocks (when it was true, and when we learned it), and adds only the facts that matter to the first request of a new conversation, in Claude Code and Codex. In an offline eval, memory tokens per new conversation fell from 262 to 41, and the share of relevant facts rose from 4.2% to 45.3%.
context-mode.com/blog/memory…







