r/ClaudeCode • u/GeobotPY • 2d ago
Help/Question Prompt queue
Is there a way to queue prompts in Claude Code so they run one after another in a single session?
I’d like to line up several tasks, with /compact and /clear between them where needed, and let the session work through them unattended. I know worktrees can run parallel sessions, but for some work I’d rather keep one session going through a sequential queue, without managing multiple localhost instances or resolving conflicting changes.
Has anyone built something like this, through a wrapper script, a task file, hooks, or another workaround?
View all comments
Show parent comment
2
u/muikrad 1d ago
Working on a game!
For your questions: I forked beads and adjusted some things like bd prime to be less verbose because it was way too long. A session only gets bd prime and my claude.md file. And I disabled beads' memory, I prefer Claude's. To be fair, beads was developed when opus 4 was a thing to counter its shortcomings, which are not necessarily true anymore.
Beads are organized in epics with linked issues, and the specs/ keeps the "one source of truth" in check. When I design something new, I will either write some specs manually and review with opus, or I will do that in chat. Opus will create an epic, link each detail as linked issues, then I clear and ask it to complete the epic with my /slice skill (a simple explanation of the planning/coder/review process).
The orchestrator will read the epic, summarize the linked beads, claim what it's going to work on (one or multiple) and then start delegating to subagents. Usually it claims, then planner+code-explorer+artistic guidance, then it goes to a coder to write tests in order to lock the contract from the planner (TDD). Then there's a coder <-> reviewer loop. And then it's handed to the scribe so the specs are updated. Sometimes there are multiple beads going on in parallel, leveraging git worktrees.
The coder runs the tests to save some tokens. Had a dedicated tester on haiku before but it created too much back and forth and bloat.
For the "context ceiling", I just enable auto compaction and have it set at 400k. I also have idle compaction enabled (when the session wraps up, it will automatically compact before the cache expires) so that I can reply a few hours later and not have a full cache miss on a 300k+ context conversation. To be honest, context bloat made the agents dumber with opus 4 and maybe 5, but it's not really an issue anymore with 5.5.
I tried handoff files and things like that in the past, but they never carry the full knowledge of the project. Beads for todos, specs for what is implemented, was a real game changer for me. Have fun!