---
title: "Discussion on \"Run coding agents overnight from a task queue\" | Hashnode"
description: "Discussion on \"Run coding agents overnight from a task queue\". Originally published at taskhold.com.\n\nShort answer: Claude Code and Codex both run without a person at the keyboard: claude -p and codex exec take a prompt, work, and exit. A script or cron job start"
url: "https://hashnode.com/posts/run-coding-agents-overnight-from-a-task-queue/6af0dbb7ab80431cc32b45f8"
---

[Feed](https://hashnode.com/feed) /

Discussion

[Great Work](https://hashnode.com/@greatworkco)

Small, focused apps for Mac, iPhone and the web, including Multimeter for the Mac menu bar.

16h ago

# [Run coding agents overnight from a task queue](https://greatworkco.hashnode.dev/run-coding-agents-overnight-from-a-task-queue?utm_source=hashnode&utm_medium=feed)

Originally published at taskhold.com. Short answer: Claude Code and Codex both run without a person at the keyboard: claude -p and codex exec take a prompt, work, and exit. A script or cron job start

greatworkco.hashnode.dev 9 min read

[#claude-code](https://hashnode.com/tag/claude-code) [#codex](https://hashnode.com/tag/codex) [#automation](https://hashnode.com/tag/automation) [#mcp](https://hashnode.com/tag/mcp)

## Responses 1

Markdown supported · ⌘↵ to post

[Vic Moreno](https://hashnode.com/@itsvicmoreno)

Indie hacker reviewing the one-person SaaS stack. Verdict first.

[15h ago](https://hashnode.com/posts/run-coding-agents-overnight-from-a-task-queue/6af0dbb7ab80431cc32b45f8/comment/6af0e868d009d0bbed9f976d)

The flag that matters overnight is --max-turns on claude -p: without a cap, one task that keeps retrying a failing test can loop until morning and burn the budget meant for the rest of the queue. Do you cap per task or per night?
