Sometimes, the hidden cost of an AI coding agent isn’t the task you’re asking it to complete. It’s the context the agent carries before the work even begins.

At Wiv, we recently cleaned up our Cursor configuration across a monorepo shared by our main FinOps application and Wiv Air, our AI spend governance product. The result: we reduced baseline instruction context for Air-focused work from roughly 27,000 to 4,600 tokens — an 83% reduction — while keeping the same Cursor Auto setting.

This wasn’t a measured 83% reduction in our overall AI bill. It was a reduction in fixed instruction overhead, and it taught us a useful lesson about managing AI consumption.

The Challenge: Small Tasks, Heavy Context

Our monorepo contains two products with different stacks and conventions. Sharing a repository helps us move quickly, but it also means an AI agent can encounter instructions meant for another application.

Over time, repository guidance, always-on Cursor rules, and shared resources had created a heavy starting point for everyday tasks. An agent asked to change a small Air UI component didn’t need an entire manual for the main web application.

Cursor Auto handles model selection automatically. Although task complexity can affect routing, we don’t know the full routing algorithm and can’t claim that a specific rule or token count caused a particular model choice. What we could control was the context our own repository supplied.

Three Changes That Made the Difference

1. Scoped AGENTS.md by application

We replaced lengthy, broad instructions with a short root AGENTS.md for shared conventions and nested AGENTS.md guidance for each application. Agents now have clearer access to relevant instructions instead of receiving one sprawling set of directions.

For example, a monorepo can use a root AGENTS.md plus apps/web/AGENTS.md and apps/air/AGENTS.md. Each file has a specific job: shared standards at the top, application conventions near the code.

2. Loaded Cursor rules only when relevant

We reviewed rules that were being applied to every conversation. Where appropriate, we switched to file-pattern-based rules and short descriptions for on-demand selection, instead of setting alwaysApply on everything.

For example, an Air UI rule can use globs such as apps/air/**/*.tsx and alwaysApply: false. This keeps detailed UI instructions tied to relevant files. Universal security and engineering requirements should, of course, remain globally enforced.

3. Removed redundant context

We retired overlapping always-on guidance and split an oversized shared strings module into more focused pieces. Routine UI work no longer needed to pull in so much unrelated reference material. The point wasn’t to hide information from the agent; it was to make the right information easier to find.

The Result: 27K to 4.6K Baseline Tokens

Before: approximately 27,000 baseline instruction tokens.

After: approximately 4,600 baseline instruction tokens.

Difference: approximately 22,400 fewer tokens, or 83% less baseline instruction context.

We kept Cursor Auto enabled. The comparison shows a smaller instruction floor, not a measured reduction in total development cost, faster task completion, or a proven change in model routing.

That distinction matters. Actual AI costs depend on the selected model, input and output tokens, caching, tool calls, usage frequency, and pricing. A cleaner baseline is one part of the equation, not the entire answer.

What Other Engineering Teams Can Take Away

If your team uses AI coding agents in a large repository, start with three questions: Which instructions truly belong in every session? Which rules should apply only to specific files? And which large resources are agents repeatedly discovering for small tasks?

Measure the baseline before and after making changes, but also monitor task quality and actual usage. Reducing context is worthwhile only when agents still receive the guidance they need to do good work.

We saw a similar issue after using v0 to accelerate early UI prototyping: rapid development can leave conventions spread across files and documentation. Giving agents a clearer map is part of keeping a growing codebase maintainable.

If youre using cursor auto (balance), do check the modal usage now and them

Why This Matters for AI Cost Management

At Wiv, we build products to make technology and AI spending easier to understand and govern. This engineering cleanup reinforced a broader FinOps principle: you can’t manage consumption well if you ignore the things driving it.

For coding agents, that means repository context and tool behavior. For organizations adopting AI at scale, it also means visibility into spending, budgets, team-level accountability, and controls.

That’s the thinking behind Wiv Air. Better context hygiene helps engineering teams avoid unnecessary overhead; AI spend governance helps organizations understand and control usage as it grows.

Explore Wiv Air: https://wiv.ai/wiv-for-ai-cost

Quick FAQ

Does 83% fewer instruction tokens mean 83% lower Cursor costs?

No. This was an 83% reduction in baseline instruction context. Overall costs depend on the full workload, model selection, and pricing.

Can AGENTS.md reduce Cursor context overhead?

Scoping shared and app-specific instructions can reduce irrelevant baseline guidance while preserving conventions needed for each part of a repository.

Does less context force Cursor Auto to choose a cheaper model?

No. Cursor controls its routing decisions. A change in model selection needs to be verified with actual routing data.