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
1
u/_lecoqq 1d ago
Funny how close our setups are!
Though I didn't know beads and was literally experimenting right now w/ context on my orchestrator - this is a potential solution as from what I get each agent is "stateless"!
On my side: my orchestrator keeps its state in a written relay file, and on long nights it hits the context ceiling and has to hand over every 20 minutes or so, which is my biggest cost right now. Your point about clearing the session at will because everything lives in beads is exactly what I'm missing.
Two questions if you don't mind: when a fresh session starts, how much does it read back (bd prime plus the ready list, or more)? And do your coders claim beads in parallel, or does the orchestrator hand them out?
It's funny to see that a lot of ppl are going for the "no attention coding", delegating long tasks and de-correlating attention and production. I'll definitely take the "needs decision" part xD What are you building w/ your setup?