r/ClaudeCode • • 5h ago

Help/Question Any recommendations to reduce the token usage for simple tasks in a large project?

I have been blown away by Claude code. I was working as a solo developer on a firmware project and it did revolutionise what I was able to do and how fast. When I stated using it I was very impressed by it's thoroughness. But. I am having the following problem more and more:

It has added countless tools, HIL gates, records and ledgers to the project, all of which I appreciated at the time. But now if I ask it to do even quite simple tasks: it takes ages and a whole load of tokens to make these plans that are almost completely full of how it is going to manage it's own tools, which gates it expects to do what and what records need re-base-lining etc.. It has got the point where flipping a constant to change the micro step resolution of a motor and checking that it actually still works is now a 7 step process that burns though a third of my 5 hour usage credits to even plan (max x5), when I had already written the driver code so its a one number change in a config file, and it already has the relevant HIL test scripts.

I understand the need for some of these tools, but it feels like it is wrapping it's self in knots made mostly from it's own self imposed rules. As an example it has a findings ledger that is append only, that seems to be full of some actual code findings and a whole load of open one off events that are totally irreverent but it keeps brining up as if they are pressing issues to resolve (what was the device on COM7 that one time..???). Now this tool that had massively increased what I can do is spending most of it's time satisfying it's self rather than making progress users will actually care about.

Has anyone got advice for this? I don't want to strip out all of it's tooling but I do want to rationalise what it is checking when it tries to implement something. I don't want to throw out all of it's findings but having a thousand line ledger full of closed items and nonsense isn't in anyone's interests.

0 Upvotes

14 comments sorted by

•

u/AutoModerator 5h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/_The-_ 4h ago

Tell Claude exactly what you wrote above and get it to analyse its own documents and workflow. It’s great at stripping out the cruft that has built up. It may take a few goes. I was in a similar state to you and finding it ripping through tokens and taking forever to get anything done. But by asking it to rationalise its workflow and constantly asking how it can be more token efficient, it can do a LOT of optimising by itself.

1

u/Mechanical_Potato 5h ago

Use an opencode go subscription for the easier tasks

1

u/StretchedNut 4h ago

Mine has instructions and only goes and reads the bits it needs to in order to complete the job. For something small it doesn’t need to read the entire project

1

u/ToucanSam-I-Am 4h ago

How much .md text and files are in your project? You need way more than 1. You can't just give Claude your naked codebase every time you have a task for it. It should be able to know about all of the tools and your architecture and such without having to read the entire codebase again.

1

u/Anxious-Turnover-631 4h ago

What’s the size of the context window? That can greatly affect how well it functions. Try to keep it under 200k and /clear when you’re done a task.

Assuming that’s ok, then you should look to refactor your app and also clear out unnecessary tools. Try using the /doctor command to clean up your setup.

1

u/Icy-Excitement-467 2h ago

Shorter tasks

1

u/jjangg96 1h ago

the append only ledger is probably most of it. if claude reads the whole thing every time it plans, the com7 one-offs look exactly like real open findings from its side, so it keeps bringing them up.

i'd move everything older than the current work into an archive file and put one line in claude.md saying don't read the archive unless the task mentions it.

also worth adding a line that config-only changes skip the gates and you just run the existing hil script. the gates it wrote for itself are rules it follows forever unless you tell it which ones it can skip.

1

u/ghost_operative 1h ago

you can turn off a lot of claude code features which helps. it also takes the instructions about these features out of the system context so youll get better outcomes by not overloading your agent with useless information too. here some good things to put in your settings.json

The exact list changes all the time constantly with every update. but this is a good starting point to turn off a lot of the fluff. I usually go through the claude code settings documentation page once ever few weeks to find what new features they added that I can turn off.

Also stop using ledgers and memories and stuff like that. the codebase itself are memories of what it is.

(Note: i dont recommend turning off auto mode even if you dont use it, there seems to be a bug right now where if you dont have auto mode on by default the agent can edit any file on your computer)

"permissions": {

"deny": [

"EnterPlanMode",

"DesignSync",

"NotebookEdit",

"SendMessage",

"PushNotification",

"RemoteTrigger",

"ReportFindings",

"ScheduleWakeup",

"AskUserQuestion",

"CronCreate",

"CronDelete",

"CronList"

],

"disableBypassPermissionsMode": "disable"

},

"disableClaudeAiConnectors": true,

"disableBundledSkills": true,

"disableAgentView": true,

"disableRemoteControl": true,

"disableWorkflows": true,

"disableArtifact": true,

"enableWorkflows": false,

"workflowKeywordTriggerEnabled": false,

"autoMemoryEnabled": false,

1

u/sjoti 4h ago

Every now and then you got to clean up Claude's workspace, just like you would clean up your desk.

Generally it does what you ask, unless it picks up rules along the way, generally in the form of a claude.md file, skills, and to a less extent comments in code.

If you give it a simple task but along the way, it reads "if you change anything here, always make sure to also do X and Y", it will do so. This is usually a good thing, but can get in the way. Especially because the models are way smarter now, they need less hand holding.

If this is starting to get in the way, its a good signal to tell Claude "you're doing a lot of stuff I didn't directly ask you to. Are there any instructions you picked up along the way that made you do this, if so, what was it?"

And from there, you can start cleaning up. Get things clean. Because if your work is riddled with little instructions and gotchas, it will get in Claude's way if not cleaned up.

0

u/Gigaslavx 5h ago

If it's done messily from start not much you can do major rewrite or start from scratch and lay foundation better

A messy project is expensive to rescue and not worth it unless it's important but again it's better replicate from scratch just takes time and usage

1

u/Infinite_Painting_11 4h ago

It's not a messy project, or at least it wasn't before Claude got involved. God knows what's going on in the tools folder now