nulltickets
nulltickets copied to clipboard
Deterministic errors burn max_attempts — need client-forced dead-letter
Problem
POST /runs/{id}/fail dead-letters only when fail_count >= max_attempts. For deterministic errors (e.g. bad pipeline/definition config, missing workflow for the pipeline), retries can never succeed, yet the task:
- with
max_attemptsNULL → retries forever - with
max_attemptsset → burns the full attempt budget before dead-lettering
The failing agent knows the error is non-transient, but has no way to tell the server.
Proposal
POST /runs/{id}/fail accepts optional "dead_letter": true:
- skip the max_attempts check, take the dead-letter branch immediately
dead_letter_reason = 'client_requested'(vsmax_attempts_exceeded)next_eligible_at_ms= impossible timestamp → excluded from claim SQL, same as existing dead-letter flowdead_letter_stagerouting still honored if defined
Default false — existing behavior unchanged.
PR incoming: feat/fail-dead-letter-flag.