If you want Claude Code to do some work while you’re away (or doing other work) but don’t want to install someone’s 40k-line agent framework repo, this is the smallest setup I know of that works… You need:
- a folder of Markdown files,
- one custom command
- one cron line. It runs tasks from a queue, timed to Pro’s usage windows instead of the clock or your availability, so you stop losing the windows that open while you sleep. There’s nothing to install beyond Claude Code itself, only takes 15 minutes to set up and is easy to maintain. If that sounds like something for you, read on!
- Understand the window Claude Pro usage resets on a rolling 5-hour window that starts with your first message. If a job runs once a day at 9am, it uses just one window a day. The windows that would open overnight or during meetings are lost.
- Make a queue Simply create a folder with one Markdown file per task: tasks/ ready/ blocked/ done/ Only put a file in ready/ once its spec is complete. Half-formed ideas: NO! Take the time to think what you want to build first. Hint: Claude is great at taking your rough ideas and writing the specs for you. Anyway. A spec is ready -> it goes into the ready folder.
- Write each task as a spec So what is a spec here? A markdown file that describes what you want Claude to build, with these sections (tailor to your preferences, this is very barebones):
Story: Export notes as CSV ## Goal <goal of the story> ## Out of scope <where Claude should not go> ## Done when <acceptance criteria, test requirements, …> ## Agent log <leave empty, this is for Claude!>
“Done when” does most of the work. If you can’t write it, the task isn’t ready. 4. Write the instructions for the run Save this as a custom slash-command in .claude/commands/next-task.md : Take the oldest file in tasks/ready/. If Goal or Done when is empty, move it to tasks/blocked/, append a note to Agent log explaining why, and stop. Otherwise create a branch, implement the task, run the tests, and open a PR. Append to Agent log what changed, what’s left, and anything you’re unsure about. Move the file to tasks/done/. Of course you can amend this command as you see fit - I like to include things like using subagents, worktrees, and so on. Up to how you roll! 5. Schedule it to match the window 0 */5 * * * cd ~/code/myrepo && claude -p “/next-task” >> ~/agent.log 2>&1 Every run starts with a full session allowance. On macOS, use launchd if cron doesn’t run while the lid is closed.
What about the weekly window? True. That’s still there, this won’t help on that front… If it’s gone, it’s gone. And using a loop like this will make sure you actually get to use all of it!
- Read the log before the PRs Each run reads Agent log first, so it doesn’t redo work. You read it too, and it tells you which PRs to look at first. I still review every PR. Some very briefly, but still. I review. What’s changed is that an idea gets a PR the next morning instead of weeks later when I get around to starting a Claude Code session.
That’s the whole setup. When it stops being enough, you’ll know exactly which part to replace, because you wrote all of it. These days I actually keep my queue as a board in my notes app as things got out of hand and I wanted better visualization (filtering with labels and so on), but this folder version is how it started and it works just as well. How do you run your agentic coding loops? Anyone doing it low-tech and simple like this? What’s the high end alternative? submitted by /u/vistdev
Originally posted by u/vistdev on r/ClaudeCode
