Skip to content

fix(AlgorithmNudge): re-arm the late-ISA row on a tool-call budget (#2074) - #2083

Open
Bowlerjim wants to merge 1 commit into
danielmiessler:mainfrom
Bowlerjim:fix/2074-late-isa-rearm
Open

Bowlerjim wants to merge 1 commit into
danielmiessler:mainfrom
Bowlerjim:fix/2074-late-isa-rearm

Conversation

@Bowlerjim

Copy link
Copy Markdown

Fixes #2074.

The problem

The late-ISA row fired once at call 25 and its only reset lived inside the run-closed branch. A session that never registers a run, the exact condition the row exists to notice, was nudged once and then never again, however long it ran.

The change

hooks/AlgorithmNudge.hook.ts 3.2.2 → 3.3.0:

  • LATE_ISA_REARM = 3 * LATE_ISA_THRESHOLD (75 calls): while no run is registered, the row re-arms once that many calls have passed since its last fire, still subject to the existing per-type cooldown, so it cannot become a nag
  • a registered run clears the latch
  • state gains lateISAFiredAtCalls

This follows the reporter's stated direction: re-arm on a tool-call budget, and treat "no run ever registered" as a condition the row can revisit.

Verification

A harness drove the hook 200 calls on a synthetic primary session with the cooldown lifted after each fire. Fires at calls 25, 100 and 175, which is the threshold plus two re-arms. bun build --no-bundle --target=bun passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KdVkxUPGxFm91bsNDxyi5M

…anielmiessler#2074)

The late-ISA row fired once at call 25 and its only reset lived inside the
run-closed branch, so a session that never registered a run, the exact
condition the row exists to notice, was nudged once and then never.

Adds LATE_ISA_REARM (3x the threshold, 75 calls): while no run is registered
the row re-arms once that many calls have passed since its last fire, still
subject to the existing per-type cooldown; a registered run clears the latch.
State gains lateISAFiredAtCalls. Hook version 3.2.2 -> 3.3.0.

Verified with a harness driving the hook 200 calls on a synthetic primary
session with the cooldown lifted after each fire: fires at calls 25, 100, 175.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdVkxUPGxFm91bsNDxyi5M
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.

late-ISA nudge: the one-shot reset is unreachable when no run is ever registered

1 participant