← Back to context

Comment by samusiam

3 hours ago

I disagree that this was the issue, or that it's "rare that you'd want to do that unless you're near the context window". Clearing context after writing a plan, before starting implementation of said plan, is common practice (probably standard practice) with spec driven development. If the plan is adequate, then compaction would be redundant.

For a 2M+ LOC codebase, the plans alone are never adequate. They miss nuance that the agent will only have to rediscover when it comes to operate on them.

For spec driven development (which I do for larger issues), this badly affects the plan to generate the spec, not the spec itself.

I'll typically put it in plan mode, and ask it to generate documentation about an issue or feature request.

When it comes to write the output to the .typ file, it does much much worse if it has a cleared context and a plan file than if it has it's full context.

The previously "thought" is typically, "I know what to write now, let me exit plan mode".

Clearing context on exiting that plan mode is a disaster which leaves you much worse off and skeletal documentation and specs compared to letting it flow.

A new context to then actually implement the documented spec is not so bad, although I'd still rather compact.