Park Persistent Hermes Goals on Background Work
A persistent goal should not spend model turns repeatedly asking whether a tracked build, deployment, or batch job has finished. Hermes goal loops can park on real background-process state and resume when the process exits or a wait deadline clears.
Official goals guide: https://hermes-agent.nousresearch.com/docs/user-guide/features/goals
Use a wait barrier, not blind polling
When the judge sees that progress is genuinely gated on a process launched with terminal(background=true), it can return a wait verdict automatically. The loop then skips continuation and judge calls while the barrier is active. /goal wait <pid> [reason] can park it manually, and /goal unwait removes the barrier.
The barrier is persisted with goal state, so resuming the session does not silently lose it. If the process is already dead, exits while parked, or a time deadline passes, the stale barrier clears on the next check. Pausing, resuming, or clearing the goal also resets the wait state as documented.
Background-work checklist
- Launch bounded long work as a tracked background process.
- Use
notify_on_completefor jobs that have a real end. - Record the correct process identifier before setting a manual wait.
- State why the goal is blocked on that process.
- Avoid waiting on unrelated or long-lived server processes.
- Preserve test output needed for the next decision.
- Use
/goal statusto inspect the barrier. - Unwait only when there is useful work to do before completion.
Pitfalls
- Parking on a server or watcher that is designed never to exit.
- Using a shell-level detached process Hermes cannot track.
- Polling every turn despite an available completion notification.
- Waiting on the wrong PID after a retry.
- Treating process exit code zero as proof the final artifact works.
- Resuming work without reading the process output.
Verification steps
- Start a harmless bounded background command with completion notification.
- Set a goal whose next step depends on that command.
- Confirm
/goal statusshows a wait barrier. - Verify the loop does not burn continuation turns while parked.
- Let the process exit and confirm the barrier clears.
- Inspect the real output and run the next verification step.
- Test
/goal unwaitwith a second harmless process so manual recovery is understood.
