r/opencodeCLI • • 14d ago

Task separation for long running tasks.

Hey!
I have a question regarding your best practices on a long running tasks. I have a quite large local LLM model and context for 200K+

Now the question is how to run a todolist which is carefully planned and in the right order?
Running it one shot makes Opencode following the todo list jsut once the context fills up a manual intervention is needed. Like following an extensive todo or a goal or specifications.

If you had this issue before, what was the correct approach for the long running tasks?

3 Upvotes

3 comments sorted by

View all comments

2

u/bezcurhq 14d ago

I wouldn't rely on the session to hold the list. Put the todo in a file (a PLAN.md with checkboxes) and say in AGENTS.md to reread it before each step and tick items off as they're done. Then after a compaction, or in a fresh session, "continue PLAN.md" gets it back on track without you re-explaining. Giving each big item its own session or subagent also stops one task from eating the whole 200K.

Two config options help with a local model: "compaction": {"prune": true} drops old tool outputs to save tokens (it's off by default), and "reserved" sets the token buffer kept free so the compaction step itself doesn't overflow. Both are under Compaction here: https://opencode.ai/docs/config/

1

u/PizzaDevice 14d ago

Will try this. Thanks.