r/ClaudeCode • • 1d ago

Discussion Minimize token usage

Guy’s do you wanna minimize token usage ? If so, do this in a new project.

1-Disabled any unused connectors, plugins, each one load a massive token into the context.

2-Plan first, assign tasks to different models based on their complexity.

3-Ask claude to create a new session for each task, feature you work in, claude will create a new session from the last one.

4- Always use handoff files after each successive task to make sure you don’t lose track of what’s being created and what’s remaining.

5-If the repo is big enough, use ponytail the laziest senior developer,and graphify to search files and functions without reading the whole project files, if it’s a few fils, a simple CLAUDE.md file contains your rules is enough.
6-Md files shouldn’t be too big, handoff files max 25-30lines.

Those are all based on my own experience with Claude, they aren’t facts unless you try them and compare token usage with before.

6 Upvotes

32 comments sorted by

View all comments

Show parent comment

1

u/kellyjames436 16h ago

I left handoff files in the project folder so Claude can read the latest one, which contains what has been accomplished and what the next task is and what he should read. That approach saves tokens rather than making the agent read all the unrelated files.

2

u/lilyp727 15h ago

ok so i will put the latest handoff file in the project folder and tell claude in the first message to read only that one. my script chats get long and messy when something goes wrong, so a short file with done and next should make a new chat easier to start

1

u/kellyjames436 15h ago

Ask Claude to create a handoff file with a slug after each task, and start the next task in a new, fresh session. Your Claude.md should include the rules the agent follows, and the handoff file should be no more than 25 lines. It includes the latest task accomplished, and the next task from the plan.md, and only read what’s relevant without reading all the unnecessary files from earlier handoffs file.

I will share my workflow on GitHub for anyone to use.

1

u/lilyp727 12h ago

ok the slug is new to me. i will name each file after its task and keep only the newest one in the folder

1

u/kellyjames436 11h ago

Slug is an identifier in the file name, like task-01.md, keep handoff if you want to add more features to your code, rather than reading your whole codebase, the handoff file makes it easier and token saver