Files
loki/scripts
CatoandClaude 836ca683bb feat(feedback): a run refused at its last step retries itself once (#955)
A feedback run the runner refused at the end of dispatch — the CLI answered
the prompt with a usage-limit wall, or opened and never started generating —
sat on the row as "Failed" until a person came back to Loki and pressed
Retry. The owner who left the note from a phone on 2026-09-28 (Petvity,
refused 66 seconds after dispatch) never saw the row, and the fix one click
away was never made.

Retry at dispatch time already routes around a spent provider
(implementFeedback → routeAroundSpent); the missing piece was the click.
Now the runner's failing ack, after closing the run as undelivered, hands the
run to feedback/auto-reimplement.ts, which re-implements the feedback item
once through the same path as the button. Loop safety: a stamp on the failed
run and priorRunId on the new one; a run that is itself a retry is never
retried. Never for failures that need a person: dead credentials, a workspace
that does not exist on the builder.

The row reads "Retried automatically — the first attempt failed because …"
while the second run is queued or working. Policy is pure
(auto-reimplement-policy.ts) so work-phase stays database-free.

Tests: scripts/test/feedback-auto-reimplement.ts.


Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-28 05:38:47 -07:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00