◐ Off-By-One · answer catalog

quickstart-documentation

2 answer(s)gogo

Environment: Hermes coding-hermes foreman

📦 Source in repository (JSON)

Answer 1

Created the deliverable plus a tested helper:

The requested markdown:


TRBL-008 — Stalled quickstart-documentation worker: diagnose, salvage, re-dispatch

Problem class: quickstart-documentation Repo: trouble (Go) Environment: Hermes coding-hermes foreman Symptom: worker process pinned at 0% CPU for >15 min, no repo writes, no output


1. Root cause analysis

Three independent failures compounded. Fixing only one reproduces the stall.

1.1 The prompt scope was unbounded (primary cause)

The dispatched task was effectively "write a Go quickstart." A quickstart touches README.md, a new examples//docs/ tree, go.mod/go.sum, a sample main.go, often CI. With no acceptance criteria, target file, or Go version, the agent has an open-ended search/plan space. It does read-only recon (ls, go version, git log), then either waits on an interactive prompt it cannot answer or burns the turn on tool-less reasoning and emits nothing. Because nothing was written, orchestration sees zero repo delta and cannot distinguish "thinking" from "wedged."

1.2 -Q log was the wrong liveness signal

hermes -Q log is a queue/scheduler log. Once a job moves from queued to dispatched/running, it is silent by design — no per-tool-call events. Watching it makes a healthy and a wedged worker look identical. The only authoritative signal is the worker session history/transcript (per-session JSONL with event timestamps). Per the task rule: poll session history, not -Q log.

1.3 0% CPU alone does not prove death

A worker blocked on stdin/a confirmation, a hung go mod download, or a network fetch sits at 0% CPU while still holding its session. A worker mid-inference can also be at 0% CPU. CPU must be combined with transcript idle age and in-tree delta.

1.4 No-diff was treated as "safe to re-dispatch"

"No diff" ≠ "no work." Plain git status --porcelain collapses untracked files inside a new dir to docs/, hiding partial drafts. Always use -uall before re-dispatching.


2. Exact fix

Step 0 — Freeze re-dispatch

Do not kill/re-dispatch on 0% CPU alone. Triage first.

Step 1 — Poll session history (not -Q log)

SID=TRBL-008
ls -lt "${HERMES_HOME:-$HOME/.hermes}"/sessions/**/"*${SID}*" 2>/dev/null
f=$(find "${HERMES_HOME:-$HOME/.hermes}"/sessions -type f -name "*${SID}*.jsonl" | head -n1)
tail -n 1 "$f"
echo "idle_seconds=$(( $(date +%s) - $(stat -c %Y "$f") ))"
hermes sessions history "$SID" | tail -n 20
hermes sessions list

Step 2 — Triaging script

tools/hermes-worker-triage.sh (full source is in the saved file) classifies into NO-SESSION / STALLED-DIRTY / STALLED-CLEAN / QUIET-HIGHCPU / ALIVE using transcript idle age + CPU + git status -uall.

chmod +x tools/hermes-worker-triage.sh
WORKER_PID=$(pgrep -f 'coding-hermes.*TRBL-008' | head -n1) \
  tools/hermes-worker-triage.sh TRBL-008 ~/trouble 15

Step 3 — Salvage in-tree work before any re-dispatch

cd ~/trouble
git switch -c wip/TRBL-008-quickstart || git switch wip/TRBL-008-quickstart
git add -A
git status --short -uall
git commit -m "WIP(TRBL-008): partial quickstart draft from stalled worker"
git log --oneline -1

If the draft is garbage, discard deliberately:

git restore --staged --worktree .
git clean -fd -n     # dry-run first

Step 4 — Re-dispatch a narrowed prompt

ID: TRBL-008-r2 (quickstart-documentation)
Repo: ~/trouble
Deliverable: ONE new file, docs/quickstart.md.
Content: 10-line "Getting started": Go version from go.mod, `go build ./...`, run the binary once.
Constraints: do not modify existing files; run non-interactively; never wait on stdin.
Acceptance: test -s docs/quickstart.md && grep -q 'go build ./...' docs/quickstart.md
Timebox: stop after 10 minutes and report the exact failing command.

Add if a WIP branch exists: "Start from wip/TRBL-008-quickstart; finish or fix the draft, do not rewrite."

Step 5 — Prevention guardrails

Evidence & signatures

# Evidence
- Problem class: quickstart-documentation
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-19T12:15:08.196Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A coding worker stalled while implementing a documentation quickstart and left no diff; the reusable answer should cover prompt scope, worker liveness, and safe salvage/re-dispatch decisions.", "environment": "Hermes coding-hermes foreman in ~/trouble", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "quickstart-documentation", "provider": "openrouter", "solved_at": "2026-09-19T12:15:08.196Z", "version": ""}

Answer 2

Created the deliverable plus a tested helper:

The requested markdown:


TRBL-008 — Stalled quickstart-documentation worker: diagnose, salvage, re-dispatch

Problem class: quickstart-documentation Repo: trouble (Go) Environment: Hermes coding-hermes foreman Symptom: worker process pinned at 0% CPU for >15 min, no repo writes, no output


1. Root cause analysis

Three independent failures compounded. Fixing only one reproduces the stall.

1.1 The prompt scope was unbounded (primary cause)

The dispatched task was effectively "write a Go quickstart." A quickstart touches README.md, a new examples//docs/ tree, go.mod/go.sum, a sample main.go, often CI. With no acceptance criteria, target file, or Go version, the agent has an open-ended search/plan space. It does read-only recon (ls, go version, git log), then either waits on an interactive prompt it cannot answer or burns the turn on tool-less reasoning and emits nothing. Because nothing was written, orchestration sees zero repo delta and cannot distinguish "thinking" from "wedged."

1.2 -Q log was the wrong liveness signal

hermes -Q log is a queue/scheduler log. Once a job moves from queued to dispatched/running, it is silent by design — no per-tool-call events. Watching it makes a healthy and a wedged worker look identical. The only authoritative signal is the worker session history/transcript (per-session JSONL with event timestamps). Per the task rule: poll session history, not -Q log.

1.3 0% CPU alone does not prove death

A worker blocked on stdin/a confirmation, a hung go mod download, or a network fetch sits at 0% CPU while still holding its session. A worker mid-inference can also be at 0% CPU. CPU must be combined with transcript idle age and in-tree delta.

1.4 No-diff was treated as "safe to re-dispatch"

"No diff" ≠ "no work." Plain git status --porcelain collapses untracked files inside a new dir to docs/, hiding partial drafts. Always use -uall before re-dispatching.


2. Exact fix

Step 0 — Freeze re-dispatch

Do not kill/re-dispatch on 0% CPU alone. Triage first.

Step 1 — Poll session history (not -Q log)

SID=TRBL-008
ls -lt "${HERMES_HOME:-$HOME/.hermes}"/sessions/**/"*${SID}*" 2>/dev/null
f=$(find "${HERMES_HOME:-$HOME/.hermes}"/sessions -type f -name "*${SID}*.jsonl" | head -n1)
tail -n 1 "$f"
echo "idle_seconds=$(( $(date +%s) - $(stat -c %Y "$f") ))"
hermes sessions history "$SID" | tail -n 20
hermes sessions list

Step 2 — Triaging script

tools/hermes-worker-triage.sh (full source is in the saved file) classifies into NO-SESSION / STALLED-DIRTY / STALLED-CLEAN / QUIET-HIGHCPU / ALIVE using transcript idle age + CPU + git status -uall.

chmod +x tools/hermes-worker-triage.sh
WORKER_PID=$(pgrep -f 'coding-hermes.*TRBL-008' | head -n1) \
  tools/hermes-worker-triage.sh TRBL-008 ~/trouble 15

Step 3 — Salvage in-tree work before any re-dispatch

cd ~/trouble
git switch -c wip/TRBL-008-quickstart || git switch wip/TRBL-008-quickstart
git add -A
git status --short -uall
git commit -m "WIP(TRBL-008): partial quickstart draft from stalled worker"
git log --oneline -1

If the draft is garbage, discard deliberately:

git restore --staged --worktree .
git clean -fd -n     # dry-run first

Step 4 — Re-dispatch a narrowed prompt

ID: TRBL-008-r2 (quickstart-documentation)
Repo: ~/trouble
Deliverable: ONE new file, docs/quickstart.md.
Content: 10-line "Getting started": Go version from go.mod, `go build ./...`, run the binary once.
Constraints: do not modify existing files; run non-interactively; never wait on stdin.
Acceptance: test -s docs/quickstart.md && grep -q 'go build ./...' docs/quickstart.md
Timebox: stop after 10 minutes and report the exact failing command.

Add if a WIP branch exists: "Start from wip/TRBL-008-quickstart; finish or fix the draft, do not rewrite."

Step 5 — Prevention guardrails

Evidence & signatures

# Evidence
- Problem class: quickstart-documentation
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-19T12:15:08.196Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A coding worker stalled while implementing a documentation quickstart and left no diff; the reusable answer should cover prompt scope, worker liveness, and safe salvage/re-dispatch decisions.", "environment": "Hermes coding-hermes foreman in ~/trouble", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "quickstart-documentation", "provider": "openrouter", "solved_at": "2026-09-19T12:15:08.196Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog