Skip to content

test(think): public successors for a stall's attempt count and give-up (group A) - #3445

Closed
mattzcarey wants to merge 2 commits into
slim/harness-A-successors-4from
slim/harness-A-successors-3
Closed

mattzcarey wants to merge 2 commits into
slim/harness-A-successors-4from
slim/harness-A-successors-3

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Group A successors for "progress and the attempt budget", written to arch's ruling ("arch ruling (std A progress)"). Stacked on #3443. Tests only, no changeset.

Arch's ruling: one option drives two counts, on purpose.

  • A live interruption (a stall): each one is another scheduled retry. The turn gives up with max_attempts_exceeded at stall number maxAttempts + 1, whatever the progress.
  • onChatRecovery's attempt: the count that goes back to 1 when the last attempt made progress.

armLastingStallForTest gains a progressing option: each model call writes new text, 30 chunks, so some land in the stream log before the stall.

Successor Class Harness-backed
"tells onChatRecovery attempt 1 each time a stalled turn has made progress" passes fails until A-4
"gives a stalled turn up at stall maxAttempts + 1 even when every attempt makes progress" (two onChatRecovery calls, one max_attempts_exceeded) passes fails until A-4

Not written, and why:

  • "Without progress, 1 then 2": mechanics-only, the deputy's fallback. Recovery alarms within CHAT_RECOVERY_ALARM_DEBOUNCE_MS (30 s) collapse into one attempt, so two quick stalls without progress both report attempt 1 (measured on the class). Nothing in the test config moves the agent's clock, and a fixed 30 s wait isn't allowed. So that clause of 4634 gets no successor. Its row will say "needs interruptions more than CHAT_RECOVERY_ALARM_DEBOUNCE_MS apart; drives beginIncident", for rv-6 to confirm.
  • Resets with progress past maxAttempts up to maxInterruptedAttempts: this needs several real resets in one test. It's next. If the pool can't drive that many, the row is mechanics-only ("drives beginIncident"), per arch.
  • The work budget (4803): added. "seals a turn that keeps making progress once the work budget is spent" ends in work_budget_exceeded, with maxRecoveryWork: 2. It passes on the class.
  • Sub-agent forwarding (4671 and 4704), compaction (4734): next.

The class-only rows for 4634 and its siblings come when their successors pass on the shell.

On the harness config: all three (the attempt count with progress, the give-up at maxAttempts + 1, and the work budget) pass with A-4 (the turn definition's recovery budget).

On the harness config: all three (the attempt count with progress, the give-up at maxAttempts + 1, and the work budget) pass with A-4, the turn definition's recovery budget.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1bfbab7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@3445

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@3445

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@3445

hono-agents

npm i https://pkg.pr.new/hono-agents@3445

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@3445

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@3445

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@3445

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@3445

commit: e2bbd7c

@agent-think

agent-think Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (36cdf992 → e2bbd7cb, workflow run)

…ry's attempt resets on progress, the give-up at maxAttempts + 1 does not
@mattzcarey

Copy link
Copy Markdown
Member Author

Folded into #3455 (one PR for group A's successors, per Matt's drain rule). The branch stays.

@mattzcarey mattzcarey closed this Nov 27, 2026
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