Context
Observed during a real project run: one spike (--through design), one parallel batch of 3 items (--parallel 3 --finish-mode --pr). All issues are in the genies batch runner or genie-session.
Issue 1 — Discern verdict parse failure strands work with no PR
What happened:
/discern ran and completed (22 turns, implementation reviewed), but the batch runner exited with code 1:
[discern] Completed (22 turns, 7248 tokens, ...)
[ERROR] Could not parse verdict from /discern output — stopping (safe default)
The branch had all commits, the implementation was done, but the script halted before commit / push / gh pr create. No PR was created. No recovery path was printed.
Impact: Work was stranded in the worktree. Manual push + gh pr create required to recover.
Likely cause: The critic genie's output format doesn't consistently place APPROVED or REJECTED at the expected position/line. The parser matches too narrowly.
Suggested fix:
- Widen the verdict regex (search the full output, not just the last N lines)
- On parse failure, print the last 20 lines of discern output to the log so it's diagnosable
- Consider a recovery action: if verdict can't be parsed, push the branch and print the manual PR URL rather than silently stopping
Issue 2 — Parallel runs with duplicate slugs share a log file
What happened:
Two backlog items had the same filename in different directories:
mobile/P3-brand-token-wiring.md
admin/P3-brand-token-wiring.md
Both resolve to slug p3-brand-token-wiring. The script correctly disambiguated worktree and branch names (-admin suffix for the second), but both workers wrote to the same log file:
logs/batch-20260317-072008/p3-brand-token-wiring.log
Both runs were reported as [ERROR] Failed (exit 1) pointing to the same log. The log contained output from only one of the two runs, making it impossible to diagnose the second failure.
Suggested fix:
- Log file name should be derived from the disambiguated slug (same logic used for worktree/branch naming), not the raw slug
- Or: include the input path's directory component in the log filename (
mobile-p3-brand-token-wiring.log, admin-p3-brand-token-wiring.log)
Issue 3 — genies status requires explicit log directory
What happened:
With a batch actively running, genies status returned an error because no log directory was provided. The log directory was visible in the running process args (logs/batch-20260317-072008) but the status subcommand couldn't auto-detect it.
Suggested fix:
genies status should detect the most recent (or currently active) log directory automatically — e.g. by reading the most recently modified directory under logs/, or by checking for a lockfile/pidfile written at batch start
- Or: at batch start, write the log dir path to a known location (e.g.
.genies-current-batch) that genies status can read
Issue 4 — --through <phase> silently merges to main with no indication it skipped PR creation
What happened:
Running genies docs/backlog/mobile/P2-spike-drop-ionic-ui.md --from discover --through design produced:
[session] Merged and cleaned up: p2-spike-drop-ionic-ui
[INFO] PDLC completed: discover → design
No PR was created (correct — it's docs-only). But the output gave no indication that this was intentional. The user expected a PR and assumed the run had failed silently.
Suggested fix:
- When
--through stops before the PR phase, print an explicit note:
[INFO] --through design: stopping before PR phase. Changes merged to main directly.
- Or: distinguish docs-only phases (discover/define/design) in the summary output so it's clear no PR is expected
Related backlog item
docs/backlog/P3-genies-script-hardening.md covers the sed delimiter injection and undocumented exit codes — separate issues, already tracked.
Context
Observed during a real project run: one spike (
--through design), one parallel batch of 3 items (--parallel 3 --finish-mode --pr). All issues are in thegeniesbatch runner orgenie-session.Issue 1 — Discern verdict parse failure strands work with no PR
What happened:
/discernran and completed (22 turns, implementation reviewed), but the batch runner exited with code 1:The branch had all commits, the implementation was done, but the script halted before
commit/push/gh pr create. No PR was created. No recovery path was printed.Impact: Work was stranded in the worktree. Manual push +
gh pr createrequired to recover.Likely cause: The critic genie's output format doesn't consistently place
APPROVEDorREJECTEDat the expected position/line. The parser matches too narrowly.Suggested fix:
Issue 2 — Parallel runs with duplicate slugs share a log file
What happened:
Two backlog items had the same filename in different directories:
mobile/P3-brand-token-wiring.mdadmin/P3-brand-token-wiring.mdBoth resolve to slug
p3-brand-token-wiring. The script correctly disambiguated worktree and branch names (-adminsuffix for the second), but both workers wrote to the same log file:Both runs were reported as
[ERROR] Failed (exit 1)pointing to the same log. The log contained output from only one of the two runs, making it impossible to diagnose the second failure.Suggested fix:
mobile-p3-brand-token-wiring.log,admin-p3-brand-token-wiring.log)Issue 3 —
genies statusrequires explicit log directoryWhat happened:
With a batch actively running,
genies statusreturned an error because no log directory was provided. The log directory was visible in the running process args (logs/batch-20260317-072008) but the status subcommand couldn't auto-detect it.Suggested fix:
genies statusshould detect the most recent (or currently active) log directory automatically — e.g. by reading the most recently modified directory underlogs/, or by checking for a lockfile/pidfile written at batch start.genies-current-batch) thatgenies statuscan readIssue 4 —
--through <phase>silently merges to main with no indication it skipped PR creationWhat happened:
Running
genies docs/backlog/mobile/P2-spike-drop-ionic-ui.md --from discover --through designproduced:No PR was created (correct — it's docs-only). But the output gave no indication that this was intentional. The user expected a PR and assumed the run had failed silently.
Suggested fix:
--throughstops before the PR phase, print an explicit note:Related backlog item
docs/backlog/P3-genies-script-hardening.mdcovers the sed delimiter injection and undocumented exit codes — separate issues, already tracked.