Batch Submission
Audience: Users — Operators submitting a directory of task plans through the daemon.
hpilot submit --path <dir> submits ready, top-level .md files through the daemon one at a time. Each file's content becomes a separate task prompt. The active batch rescans after every successful task, so plans published while another task is running can join the same invocation.
bash
# Process ready .md files in prompts/ one at a time
hpilot submit --path prompts/
# With explicit task ID prefix (generates batch_1, batch_2, ...)
hpilot submit --path prompts/ --task-id batch
# Resume only the first pending plan at Implement
hpilot submit --path prompts/ --config custom.yaml --start-from Implement --resumeBehavior:
- Only top-level
.mdfiles are processed. Other file types and nested files are ignored. - The initial group is sorted lexicographically by filename. Each group found later is sorted and appended after plans already queued. Use zero-padded names such as
01-task.mdand02-task.mdfor predictable ordering. - Before queueing a newly observed plan, Harness Pilot checks that its size and modification time remain unchanged for about 0.5 seconds. A changing or disappearing file is deferred and remains eligible for a later scan.
- Publish plans atomically when possible:
- Write the complete content to a temporary non-
.mdfile. - Rename it to its final
.mdname.
- Write the complete content to a temporary non-
- An invocation needs at least one ready plan initially. An empty directory, an initial set containing only unstable plans, or a nonexistent directory produces an actionable error.
- On success, the processed file moves to
<path>/completed/. The directory is created automatically, and a same-named destination is replaced. - If a successful task already deleted, renamed, or relocated its source plan, Harness Pilot logs that the source was already absent, skips the move to
completed/, and continues the batch. - On failure, processing stops immediately. The failing plan and all queued or unstable plans remain at the top level.
- Files already in
completed/are never re-processed. - A resolved source path is accepted at most once per invocation. Reusing the same source name after it was processed waits for a later invocation.
- When the queue empties, Harness Pilot performs one final bounded readiness scan. If that scan finds no ready plan, it logs
No pending plans remainand exits. This is finite batch behavior, not persistent watching. Plans published after exit wait for the next command. --pathand the positionalpromptargument are mutually exclusive. When--pathis provided, stdin is not read.- When
--task-idis provided, submissions get a monotonic_Nsuffix across initial and later discoveries, such asbatch_1,batch_2, andbatch_3. Without it, each file gets an auto-generated ID. --start-fromand--resumeapply only to the first file submitted in the current invocation.- Every later file starts at the first configured pipeline stage.
- Every later file starts with a fresh agent session.
- Pipeline boundaries such as
--end-afterand--end-beforecontinue to apply to every file in the batch until cleared. --end-afterand--end-beforeare mutually exclusive (this applies to allsubmitcommands, not just--path).- Reaching either a submit-time boundary or an operator-updated
hpilot end --after <stage>/hpilot end --before <stage>boundary stops the whole batch, leaves the halted plan in the source directory, does not submit later plans, and exits0. - If an operator sets a boundary for a stage the active task has already passed, the active task completes normally, its plan moves to
completed/, and the boundary carries into the next submitted task. For example,hpilot end --before Planduring Commit finishes that Commit task, submits the next plan, then halts task 2 before its Plan stage executes; task 2 remains in the source directory and the batch exits0. hpilot end --clearremoves both stop-after and stop-before boundaries from the current task and drops the active batch process's effective boundary, so the current task can finish normally and every later plan is submitted without a boundary. This batch-wide effect is process-local; a new batch invocation uses its own command-line flags.- For a single-task
submit,hpilot end --clearchanges only that task; there are no later plans to inherit the cleared boundary.
Partial failure recovery:
- Re-running the same
--pathcommand skips files already moved tocompleted/. - The "first" file is the first remaining file discovered in the new invocation.
- Use
--start-fromand, when needed,--resumeto continue that file. Later files still run the full pipeline with fresh sessions.
See the runtime guide for daemon endpoints and single-task commands.