Skip to content

api tick: a bound worker whose turn died on a harness error (429 usage) is never nudged #147

Closed

Description

@SSFSKIM

arkho-board:ticket:58 — mirrored from the Arkho board.
Read-only. Edits here are reverted; closing this issue does not close the ticket. The board is the source of truth.
Board ticket: https://arkho-board-service.onrender.com/ui/t/58


Problem

A bound worker whose turn dies on a harness-level error stays bound, idle, and silent, and the api tick never nudges it. Observed 2026-09-13 on the arkho binding: the qagent on ticket 42 (run 17) hit API Error: Request rejected (429) · This account is out of plan usage until 2026-09-13T14:00:00Z at 09:3x UTC. Its seat read idle, its lease was renewed on every tick for nine hours, the ticket stayed in-review with owner_run=17, and nothing happened until an operator ran sminos wake by hand at 18:2x. The gh-mode tick's RECOVER pass (stall clock, bounded nudge, three lifetime attempts, then park) has no api-mode twin for this case: _sweep_api.sh's phases are renew, relay, resume, dispatch. Resume only fires for runs the SERVER reclaimed, and renew deliberately keeps a live session's lease fresh, so a live-but-dead-turn session is exactly the state the tick preserves forever.

Intent

The api tick recovers a bound worker whose last turn ended in a harness error, bounded, without reintroducing judgment into the tick.

Shape

  • In _sweep_api.sh, beside renew: for each LIVE bound meta whose seat is idle and whose latest reply (sminos reply, or the transcript's last assistant turn) is a harness error line (API Error, Request rejected, out of plan usage, overloaded, rate-limit shapes), record a stall marker in the meta (first-seen time, the error text, any reset time it states).
  • Once the stated reset time has passed (or a fixed window when none is stated, e.g. 15 min), sminos wake the seat with a fixed relay line ("your last turn died on ; usage has reset; resume from where the transcript stops") and count the attempt in the meta. Three lifetime attempts per run, then leave the lease to expire so the server reclaims the run and the existing resume path takes over.
  • A worker that is idle for a non-error reason (waiting on a permission prompt, a park it already recorded) is not touched: the marker is written only when the last turn IS the error.
  • Log one line per action in the sweep log.

Acceptance

  • Drill (bats or the shell test harness under tests/claude-code/): a fake registry meta bound to a fake board run, a fake sminos reply returning the 429 line with a reset time in the past → the tick issues exactly one wake and stamps the meta; a second tick with the same reply does not wake again until the attempt window passes; the fourth attempt is never issued.
  • The same drill with an idle seat whose last reply is ordinary text → no wake, no marker.
  • scripts/lint-shell.sh baseline unchanged; tests/claude-code/run-skill-tests.sh green.
  • Bump the version with scripts/bump-version.sh in the same commit.

Activity

  1. added
    priority:P2
    status:ready-for-implementer
    status:in-progress
    status:in-review
    status:needs-human
    and removed
    status:ready-for-implementer
    status:in-progress
    status:in-review
    on Sep 14, 2026
  2. SSFSKIM commented on Sep 14, 2026

    @SSFSKIM
    OwnerAuthor

    A question is waiting on the board.

    QA request. Reviewed head fcdc466; the branch moved to 9cfac15 (three commits) while my fix wave ran, so my five graded fixes cannot be pushed and stay local — a moved head is never rebased or salvaged. Three of the five are superseded by the work already on the branch. TWO ARE NOT, and are live on 9cfac15: (1) a seat blocked on a human prompt still reads as a dead turn — sminos APPENDS the pending-AskUserQuestion / harness-prompt markers after the last assistant text and maps done-blocked to status=idle, so an anchored first-line match reads past them to an older error and nudges a worker that is waiting for a human, which dp#58 names as a must-not-touch case; (2) the hand-off still rests on an idle reading taken outside the registry lock (only run_id is re-validated under it, and phase_renew's arm at :613 never re-checks idle) — and that got sharper here, because this head ends the run and retires the meta instead of letting a lease decay, so a stale stamp now kills a mid-turn worker outright. Also merge-blocking: this branch bumped to 7.90.0 at 07:07Z, and the cross-ticket note at 07:14Z records that #59 already took 7.90.0 — someone must arbitrate the numbers and re-check against main at merge time. Full detail, with the local fixes described, in the review-trail comment on PR #151. Separately: I missed the 06:30Z heads-up comment asking reviewers to wait for the in-flight push, so wave 1 re-derived four findings already being fixed.

    Answer it on the board — https://arkho-board-service.onrender.com/ui/t/58. A reply here is not read.

  3. added a commit that references this issue on Oct 28, 2026
  4. removed
    status:needs-human
    on Nov 20, 2026
  5. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: read-only mirror of board ticket 58, which closed done on the board service; closed at the service's retirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions