Autonomous overnight work loop. Use when the user says "start night shift", "night shift", "work overnight", "work while I sleep", or otherwise indicates they want the agent to autonomously work through available tasks without supervision. Requires beans (issue tracker) to be configured in the project.
The user is stepping away and will not be available for questions. Work autonomously through all ready tasks until none remain or you approach the usage limit.
When a spec is unclear or you face a non-trivial design decision:
draft, add a ## Blocked note explaining the ambiguity, and move to the next taskThe threshold: would a competent team member make this call without escalating? If yes, proceed. If it's the kind of decision that would warrant a team discussion, don't guess — mark it blocked.
Pick the next task from beans list --ready --json using this priority order:
blocking relationships)Repeat until beans list --ready returns nothing or you're approaching the usage limit:
Select the highest-priority task per the ordering above. Read its full spec with beans show --json <id>. Mark it in-progress:
beans update <id> -s in-progress
Read the bean's body carefully. If it references other beans, design docs, or files — read those too. Build a clear picture of what "done" looks like, including acceptance criteria if listed.
Think through the implementation:
Append a ## Plan section to the bean body. This is a lightweight checkpoint — not a separate repo commit.
Follow the project's development workflow as defined in CLAUDE.md. The project conventions dictate how to write code, tests, and commits — follow them as if the user were watching.
Spawn a subagent to review the changes with fresh eyes:
Review the changes in the last 1-2 commits on the current branch. Look for: logic errors, missed edge cases, violations of existing code patterns, missing test coverage, and any issues a careful reviewer would catch. Be specific — point to exact lines. Only flag real issues, not style nitpicks.
If a subagent can't be spawned, do a self-review: re-read the full diff with critical eyes.
Fix any real issues found, verify the project's acceptance criteria still pass, and commit the fixes.
Once all todo items are checked off and acceptance criteria are met:
beans update <id> -s completed --body-append "## Summary of Changes\n\n<what was done, key decisions made>"
Include the final bean update in a commit.
Return to step 1.
When there are no more ready tasks or you're approaching the usage limit, leave a summary: