Skip to content

Add per-turn timer and todo budget feedback - #24

Open
0vp wants to merge 2 commits into
mainfrom
feature/turn-timer-todo-budgets
Open

Add per-turn timer and todo budget feedback#24
0vp wants to merge 2 commits into
mainfrom
feature/turn-timer-todo-budgets

Conversation

@0vp

@0vp 0vp commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Port the standard --timer and TodoWrite step-budget feedback from the old Espri-API eval-max-timeout branch into the current provider-agnostic harness. The source feature began in 23f906de2 (turn timer) and 49fef5b18 (todo allocations); this includes the branch's later schedule-accounting fixes.

  • Add --timer <seconds>, --timer off/0, --no-timer, and persisted /timer <seconds> / /timer preferences. CLI overrides do not overwrite saved preferences.
  • Re-arm an advisory wall-clock budget each turn. Append remaining-time notices at 50%, 25%, and 10% to the last output of a completed tool round. Background Execute launches force a fresh clock report.
  • Add optional timeBudgetSeconds to todo items. Report step duration against the allowance captured at activation, completed-step count, and remaining allocations. Flag material overcommit once per turn with the source branch's max(60 seconds, 10%) tolerance.
  • Preserve allocations across status-only updates and session resume. Filter explicitly tagged timer context from resumed display messages while retaining it in provider/model history.

Harness boundaries

  • Keep timer state, schedule accounting, outbound decoration, and prompt wording in separate modules.
  • Decorate copied outbound results only after ordinary transcript recording. Keep cancellation, retries, tool IDs, and error prefixes intact.
  • Put each turn's budget on its user message, not the cached system prefix. The prompt explicitly describes advisory behavior rather than claiming the CLI enforces termination.
  • Validate positive whole seconds consistently; malformed /timer input does not clear a saved budget.
  • No supervisor model, eval-runner changes, automatic command handback, Execute timeout redesign, or changes to sub-agent execution limits.

Validation

  • bun run validate: 1,675 passed, 9 platform-dependent skipped, 0 failed. Includes lint and both typechecks; passed again in the pre-commit hook.
  • Compiled with the repository build's bun build --compile command, using a temporary output path to preserve the existing local binary.
  • Compiled backboard --help smoke test passed.
  • Unit/integration coverage includes thresholds, delayed reports, per-turn reset, todo accounting, preference persistence, wire-only decoration, and resume behavior.
  • No live paid-model smoke test was run.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant