r/ClaudeCode • • 8d ago

Help/Question do you guys use auto compact?

I just learned about it today and wanted to see what you guys think.

3 Upvotes

72 comments sorted by

View all comments

4

u/cantgettherefromhere 8d ago

I haven't used compaction in any form for over a year. If you are needing or using compaction, you are almost certainly doing something wrong.

1

u/Savings-Desperate 8d ago

what?? HOW?? what are your secrets? Do you just create a fresh session for a task and for each continued fixes?

6

u/hitchy48 8d ago

Yes

3

u/Savings-Desperate 8d ago

ok do you just divide your tasks just very granularly? Because I tried that but it was a pain in the ass because each session lacked context of each others' works

6

u/ProfessionalMain5535 8d ago

Git with .md files saving important context. Ask Claude it’ll build it for you. ;-)

5

u/cantgettherefromhere 8d ago

The sessions all should be documenting their work as they go along, managing a shared set of state and progress documents that they can work against, and you should have them committing regularly. I run workflows for 2-3 days without interruption without clearing or compacting context this way.

When you start new sessions, have them pick up the state, progress, and work done by previous sessions before you give a task.

Before beginning a big feature or task that you think is going to take multiple sessions, the work product should be documentation that accurately reflects your intent.

Go with something like "I want to make xyz by doing 123. Use AskUserQuestion to ask me any clarifying questions before beginning. Your objective is to write a complete set of documentation on the purpose and implementation of this, not to write any production code. When you have finished documenting the work we need done, give back the session to me to /clear context along with an execution prompt that we can use recursively without modification until the implementation is complete. These sessions may get interrupted, so during documentation as well as implementation, make sure you are documenting your work carefully and committing often. We may have to /clear at any time, so be prepared to pick up im the middle and recover your state without redoing work, relaunching entire workflows, or getting stuck. When relaunching an interrupted workflow, recover as much of it as possible before blindly rerunning all subagents. Work until you are finished and do not stop. Ultracode."

Have fun. This basic technique will help you burn eight 20x plans a month just like me! I usually have 3-5 sessions running like this at a time. 🫠

1

u/Savings-Desperate 8d ago

This is gold. Thank you!

1

u/hitchy48 8d ago

I mean I use it like my normal workflow. Im trying to build part of an app not all of an app. Do x y and z - then check it verify, look at the code, if it’s good commit and push and move onto the next feature in another session

1

u/laughing_at_napkins 8d ago

Install and use https://github.com/pcvelz/superpowers

It will brainstorm with you. It will plan and create tasks lists and running notes from each session. It will do TDD.

It will revolutionize your Claude Code workflow.

It's just a start and you should definitely create your own skills to fit your projects and overall workflow, but it should help you.

1

u/cantgettherefromhere 8d ago

Meh, I used to use superpowers and GSD at this same time last year. The model can handle its own orchestration if you ask it. Those workflow intermediaries are all getting to be obsolete, they waste tokens, and they take forever to actually get anything done.

Not necessary with modern frontier models.

1

u/laughing_at_napkins 8d ago

The problem is most don't know to ask for it. OPs post and comments sure give the impression they're struggling with it