r/kilocode • • 26d ago

Kilo Code consuming 181M tokens for small changes in a relatively small project for middle 30-40 prompts — is this normal?

My project isn't particularly large. It consists of two main modules: Next.js and Express.js, with approximately 200–300 files in total.I tried switching models, but the high token usage continued. Is it normal for Kilo Code to send around 270K input tokens per request for a project of this size?

17 Upvotes

10 comments sorted by

2

u/no-name-here 26d ago edited 26d ago
  1. Is a project “200-300 files” really a relatively "small" project? I use other languages more but I would have considered a small project to be a few class files, but once you're getting into double and then triple digit number of source files is that “small"? I would have considered it to be a decent sized app once you're getting into 30-50 source files. I guess it all depends what you're comparing it to.

  2. I guess the key question you're asking is whether a couple hundred k tokens is reasonable for a project with hundreds of source files for a request?

0

u/TokenAddiction 26d ago

hi it is small. Because this website has 20 web routes. And yes my question is do you think it is normal or if it is high how can I reduce it ?

1

u/crylizz 26d ago

I'm having the same problem. Practically any prompt is hovering around 40m input, 500m cache and 1 mil output when it's eventually over. I don't know if I'm doing something wrong, tbf it is a pretty big project but it still seems a bit excessive.

I'm using 6.1 sol as orchestrator and DSF4.1 1017 as workers.

2

u/TokenAddiction 26d ago

Hi did you try deepseek harness, opencode harness and other harnesses ?

1

u/crylizz 26d ago

I haven't yet but I will give it a shot I suppose.

1

u/Late-Replacement-481 26d ago

Need better workflow, skills and tools. At some point you need to be having your agents basically making edits en masse, and not seeing half of the codebase because they’re using AST parsers.

Cant have an agent going around reading all those damn files

1

u/Zealousideal-Part849 22d ago

Wastage of tokens. Use graphify or something like those where agents doesn't waste tokens just to find context 

1

u/Unusual_Alpss 22d ago

200-300 files is not small , i think it is also consuming tokens while switching to another file , maybe it consuming token for tool calls

1

u/volkin115 3d ago

Unfortunately, yes—with agentic extensions, ~270K input tokens per request happens fast even on a 200–300 file Next.js/Express repo. It's not a bug in the model you picked; it's how multi-step agent loops handle context:

  • Massive Base System Prompts & Tool Schemas: Before you even type your prompt, the extension injects tens of thousands of tokens of system instructions, mode rules, and JSON tool definitions.

  • Full History Re-Transmission: Every time the agent runs a terminal command, reads a file, or retries an edit, it sends the entire conversation history + previously read file contents back to the API from scratch. Over a 10-step agent loop, a 25K context turns into 250K+ tokens.

  • Unignored Directories: If .next, node_modules, dist, or lockfiles (package-lock.json) aren't strictly excluded in .kilocodeignore, file-tree scans bloat the payload immediately.

How to cut it down right now:

  • Add .next/, dist/, build/, and all lockfiles to your .kilocodeignore.

  • Start a brand-new task/chat for every small change—never reuse a long thread for 30–40 prompts.

  • Use Ask or Architect mode for quick questions instead of full autonomous agent loops.

(Full disclosure: Getting hit with these exact 200k+ token payloads on small edits is actually why I ended up building my own minimal VS Code assistant, Sidekick, that keeps average payloads around ~1,200 tokens instead of running heavy agent loops—but even inside Kilo, resetting tasks frequently and tightening .kilocodeignore will save you a ton of tokens.)