Writing
2026
2025
- amidst all the chaos, finding dust to build uponNisarg Thakkar6 min readamidst all the chaos, finding dust to build upon6 min read
- ideas are cheap: do market study, validate demand, ship <-> find pmfNisarg Thakkar8 min readideas are cheap: do market study, validate demand, ship <-> find pmf8 min read
- your v̶i̶b̶e̶ shit coding sucks bcs you are missing some contextNisarg Thakkar5 min readyour v̶i̶b̶e̶ shit coding sucks bcs you are missing some context5 min read
Essay
your v̶i̶b̶e̶ shit coding sucks bcs you are missing some context
· 5 min read

First published on X. Read the original ↗

the problem nobody's talking about
problem: you're engineering prompts, not context

everyone's obsessed with crafting the perfect system prompt. "act as a senior developer with 10 years experience who writes clean code and..." meanwhile your agent:
- forgets what it did 3 messages ago
- reimplements the same function twice
- hallucinates file paths that don't exist
- costs you ₹4k/month in API bills
you're not failing because you can't "prompt." you're failing because your model's context window is stuffed with stale junk, your kv cache never hits, and your agents are vibing in parallel like they're in different groups.
result: premium hallucinations at retail prices.

the real iceberg (spoiler: it's below the surface)
most devs keep polishing prompts while the real failures sit below:
too little context → vague, generic answers that don't solve your actual problem
too much context → model gets distracted, focuses on irrelevant details, burns tokens
bad context → poisoned against reality, hallucinates confidently
think of it this way: the model is your CPU. the context window is your RAM. you can have the fastest processor in the world, but if your RAM is filled with garbage you're getting blue screens.
engineer the RAM, not just the spell.
so anyone wondering what the hell i am saying continue….

kv cache: the cheat code you're actively destroying
cheat code: kv cache hits
as the model reads tokens it computes attention across them and stores keys/values in cache. if earlier tokens remain identical on the next turn the model reuses this cache at ~10% cost instead of full recompute.
but here's where devs fuck it up:
you inject "current time: 12:30:05" into your system prompt. every single turn. that tiny mutation forces a complete recompute of the entire prefix. your costs snowball. your latency spikes. your margins die.
the math that hits your wallet
let's say you have a 3 turn conversation:
without kv cache hits (because you keep mutating the prefix):
- Turn 1: 5,000 tokens
- Turn 2: 5,000 tokens + 10,000 tokens (full recompute)
- Turn 3: 5,000 tokens + 10,000 tokens (full recompute)
- Total: ~35,000 tokens
with kv cache hits (stable prefix):
- Turn 1: 5,000 tokens
- Turn 2: 5,000 new + (0.1 × 5,000 cached) = 5,500 tokens
- Turn 3: 5,000 new + (0.1 × 10,000 cached) = 6,000 tokens
- Total: ~16,500 tokens

same model. same work. you just chose between 35k tokens vs 16.5k tokens only difference is whether you kept the prefix stable.

the rules that keep context clean (and bills sane)
rule 1: append only context: never rewrite the prefix. append new events as trailing messages.

think of your context like a git log you don't rewrite history, you add new commits.
bad:

good:

rule 2: mask tools, don't juggle them

here's the genius move: keep full tool definitions in context, but constrain generation via logic bias to permit only relevant tools for this step.
example: you have 4 tools defined (for ex: brower_navigate, browser_click, shell_execute, database_query). this step only needs browser navigation. instead of removing the shell_execute and database_query tool you keep the all tools definition in context but mask the mask the not required tools for logic processing. so when modal complete a tool call, it can complete with navigate or click.
bad approach:

good approach:

cache remains reusable. model doesn't "see" distractions. you just saved 70% of your token costs on tool heavy workflows.
multi agent reality check (sorry, not sorry)

the "multi agent symphony" looks sick in your pitch deck. in production? it's parallel chaos.
here's what actually happens:
- agent A interprets "build a login system" as form + validation
- agent B interprets it as auth service + JWT
- agent C thinks you wanted OAuth integration
- they never talk to each other properly
- you get 3 incompatible implementations
- you spend 2 days debugging agent handoffs instead of building features
2025 reality check: one agent with a single continuous context window, executing subtasks linearly, beats fragile parallel setups 9 times out of 10.

when to actually use multiple agents
use micro agents only for:
- throwaway tasks that don't need to persist in history
- completely isolated domains (one agent for frontend, one for backend, never the twain shall meet)
- embarrassingly parallel work (processing 100 images, each is independent)
if your agents need to "collaborate," you're probably better off with one agent and better context management.

context rot: why your window turns to sludge
add a few semantically similar distractors and performance craters. in repetitive flows agents few shot themselves into drift or hallucination.

you must sometime have experience your model performing todo list it's great at first but if your context is full of the similar past action, the model will tend to follow that pattern, even when it's not optimal.
real example from production:
- turn 1-5: agent writes clean, modular code
- turn 10-15: agent starts repeating patterns from earlier turns
- turn 20+: agent is basically copying its own previous responses whether relevant or not
this is context rot. fight it deliberately with:
pattern 1: write (offload)
store long term summaries, scratchpads, and state outside the window. bring back only what's needed.

pattern 2: select (rag)
fetch only relevant docs/tools via embeddings or similarity fewer shiny distractors -> tighter outputs.

pattern 3: compress
summarize old chat output into "decision + link + tool used" instead of raw dumps.

pattern 4: isolate
partition contexts for distinct tasks. sandbox sensitive flows.

the vibe coder's checklist: make each token pay rent
when you're building with any ai agents your context is your codebase. treat it like production code:
be precise, set examples, filter aggressively, watch fullness, automate handoffs:
- don't mutate prefixes → append only keep cache alive
- keep all tasks defined → mask irrelevant actions via generation constraints
- single agent with continuous context → parallel only for disposable micro tasks
- summarize early → before hitting 50% capacity
- select via rag → fetch only what's relevant right now
- isolate sensitive flows → separate contexts for separate concerns
- watch window fullness → quality dips beyond ~50%, dies after 70%
- if your kv cache doesn't hit, your margins won't either
this turns a generic llm into a beginner developer who actually knows your repo.
extra: bonus tips that save big rupees
1. Cache-Aware Token Bill

2. Window Health Score

3. Attention Budget Per Task

non promotional tips
if you want a tool for your next vibe-coding project, check out https://repoprompt.com/.
It’s solid for context and prompt engineering.
I’m building a smaller version for managing context and plan to launch the mvp by month’s end.
thanks for reading this brain rot hope you learned something and save tokens for your next vibe coding project.

References
- Context Engineering for AI Agents: Lessons from Building Manus: https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus
- Context Rot: How Increasing Input Tokens Impacts LLM Performance: https://research.trychroma.com/context-rot
- Anthropic - Prompt Engineering Guide: https://docs.anthropic.com/claude/docs/prompt-engineering
- Why Making AI Wrappers Is Harder Than You Think: https://www.youtube.com/watch?v=SvIJ-BIAPNI
- OpenAI - Optimizing LLM Applications: https://platform.openai.com/docs/guides/optimizing-llm-applications
- LangChain - Managing Context Windows: https://python.langchain.com/docs/modules/memory/
Essay
your v̶i̶b̶e̶ shit coding sucks bcs you are missing some context
· 5 min read

First published on X. Read the original ↗

the problem nobody's talking about
problem: you're engineering prompts, not context

everyone's obsessed with crafting the perfect system prompt. "act as a senior developer with 10 years experience who writes clean code and..." meanwhile your agent:
- forgets what it did 3 messages ago
- reimplements the same function twice
- hallucinates file paths that don't exist
- costs you ₹4k/month in API bills
you're not failing because you can't "prompt." you're failing because your model's context window is stuffed with stale junk, your kv cache never hits, and your agents are vibing in parallel like they're in different groups.
result: premium hallucinations at retail prices.

the real iceberg (spoiler: it's below the surface)
most devs keep polishing prompts while the real failures sit below:
too little context → vague, generic answers that don't solve your actual problem
too much context → model gets distracted, focuses on irrelevant details, burns tokens
bad context → poisoned against reality, hallucinates confidently
think of it this way: the model is your CPU. the context window is your RAM. you can have the fastest processor in the world, but if your RAM is filled with garbage you're getting blue screens.
engineer the RAM, not just the spell.
so anyone wondering what the hell i am saying continue….

kv cache: the cheat code you're actively destroying
cheat code: kv cache hits
as the model reads tokens it computes attention across them and stores keys/values in cache. if earlier tokens remain identical on the next turn the model reuses this cache at ~10% cost instead of full recompute.
but here's where devs fuck it up:
you inject "current time: 12:30:05" into your system prompt. every single turn. that tiny mutation forces a complete recompute of the entire prefix. your costs snowball. your latency spikes. your margins die.
the math that hits your wallet
let's say you have a 3 turn conversation:
without kv cache hits (because you keep mutating the prefix):
- Turn 1: 5,000 tokens
- Turn 2: 5,000 tokens + 10,000 tokens (full recompute)
- Turn 3: 5,000 tokens + 10,000 tokens (full recompute)
- Total: ~35,000 tokens
with kv cache hits (stable prefix):
- Turn 1: 5,000 tokens
- Turn 2: 5,000 new + (0.1 × 5,000 cached) = 5,500 tokens
- Turn 3: 5,000 new + (0.1 × 10,000 cached) = 6,000 tokens
- Total: ~16,500 tokens

same model. same work. you just chose between 35k tokens vs 16.5k tokens only difference is whether you kept the prefix stable.

the rules that keep context clean (and bills sane)
rule 1: append only context: never rewrite the prefix. append new events as trailing messages.

think of your context like a git log you don't rewrite history, you add new commits.
bad:

good:

rule 2: mask tools, don't juggle them

here's the genius move: keep full tool definitions in context, but constrain generation via logic bias to permit only relevant tools for this step.
example: you have 4 tools defined (for ex: brower_navigate, browser_click, shell_execute, database_query). this step only needs browser navigation. instead of removing the shell_execute and database_query tool you keep the all tools definition in context but mask the mask the not required tools for logic processing. so when modal complete a tool call, it can complete with navigate or click.
bad approach:

good approach:

cache remains reusable. model doesn't "see" distractions. you just saved 70% of your token costs on tool heavy workflows.
multi agent reality check (sorry, not sorry)

the "multi agent symphony" looks sick in your pitch deck. in production? it's parallel chaos.
here's what actually happens:
- agent A interprets "build a login system" as form + validation
- agent B interprets it as auth service + JWT
- agent C thinks you wanted OAuth integration
- they never talk to each other properly
- you get 3 incompatible implementations
- you spend 2 days debugging agent handoffs instead of building features
2025 reality check: one agent with a single continuous context window, executing subtasks linearly, beats fragile parallel setups 9 times out of 10.

when to actually use multiple agents
use micro agents only for:
- throwaway tasks that don't need to persist in history
- completely isolated domains (one agent for frontend, one for backend, never the twain shall meet)
- embarrassingly parallel work (processing 100 images, each is independent)
if your agents need to "collaborate," you're probably better off with one agent and better context management.

context rot: why your window turns to sludge
add a few semantically similar distractors and performance craters. in repetitive flows agents few shot themselves into drift or hallucination.

you must sometime have experience your model performing todo list it's great at first but if your context is full of the similar past action, the model will tend to follow that pattern, even when it's not optimal.
real example from production:
- turn 1-5: agent writes clean, modular code
- turn 10-15: agent starts repeating patterns from earlier turns
- turn 20+: agent is basically copying its own previous responses whether relevant or not
this is context rot. fight it deliberately with:
pattern 1: write (offload)
store long term summaries, scratchpads, and state outside the window. bring back only what's needed.

pattern 2: select (rag)
fetch only relevant docs/tools via embeddings or similarity fewer shiny distractors -> tighter outputs.

pattern 3: compress
summarize old chat output into "decision + link + tool used" instead of raw dumps.

pattern 4: isolate
partition contexts for distinct tasks. sandbox sensitive flows.

the vibe coder's checklist: make each token pay rent
when you're building with any ai agents your context is your codebase. treat it like production code:
be precise, set examples, filter aggressively, watch fullness, automate handoffs:
- don't mutate prefixes → append only keep cache alive
- keep all tasks defined → mask irrelevant actions via generation constraints
- single agent with continuous context → parallel only for disposable micro tasks
- summarize early → before hitting 50% capacity
- select via rag → fetch only what's relevant right now
- isolate sensitive flows → separate contexts for separate concerns
- watch window fullness → quality dips beyond ~50%, dies after 70%
- if your kv cache doesn't hit, your margins won't either
this turns a generic llm into a beginner developer who actually knows your repo.
extra: bonus tips that save big rupees
1. Cache-Aware Token Bill

2. Window Health Score

3. Attention Budget Per Task

non promotional tips
if you want a tool for your next vibe-coding project, check out https://repoprompt.com/.
It’s solid for context and prompt engineering.
I’m building a smaller version for managing context and plan to launch the mvp by month’s end.
thanks for reading this brain rot hope you learned something and save tokens for your next vibe coding project.

References
- Context Engineering for AI Agents: Lessons from Building Manus: https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus
- Context Rot: How Increasing Input Tokens Impacts LLM Performance: https://research.trychroma.com/context-rot
- Anthropic - Prompt Engineering Guide: https://docs.anthropic.com/claude/docs/prompt-engineering
- Why Making AI Wrappers Is Harder Than You Think: https://www.youtube.com/watch?v=SvIJ-BIAPNI
- OpenAI - Optimizing LLM Applications: https://platform.openai.com/docs/guides/optimizing-llm-applications
- LangChain - Managing Context Windows: https://python.langchain.com/docs/modules/memory/
your v̶i̶b̶e̶ shit coding sucks bcs you are missing some context
- Published
- Topic
- Personal writing
- Author
- Nisarg Thakkar
- Reading time
- About 5 min