Repository navigation
H7: the harness-backed Think's actions wait for approval in the transcript - #3331
Merged
Merged
Conversation
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
Contributor
|
✅ agents import sizes: no significant changes ( |
mattzcarey
force-pushed
the
slim/harness-h7
branch
3 times, most recently
from
November 27, 2026 01:27
6b4ae91 to
e490f1c
Compare
mattzcarey
force-pushed
the
slim/harness-h2
branch
from
November 27, 2026 01:40
195ec06 to
c550fd9
Compare
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 01:40
e490f1c to
7f5e2c3
Compare
mattzcarey
force-pushed
the
slim/harness-h2
branch
from
November 27, 2026 01:59
c550fd9 to
7fd8a21
Compare
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 02:00
7f5e2c3 to
83c0d08
Compare
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 02:07
83c0d08 to
ecd714d
Compare
mattzcarey
marked this pull request as ready for review
November 27, 2026 02:54
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 03:12
2f534a6 to
740ffeb
Compare
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 03:21
740ffeb to
59244de
Compare
mattzcarey
force-pushed
the
slim/harness-h7
branch
5 times, most recently
from
November 27, 2026 07:35
9c7d64a to
66cc831
Compare
…d out of the Think class)
…pause call waits in the transcript and is listed and decided through pendingApprovals/approveExecution/rejectExecution
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 08:20
66cc831 to
deaaaa2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
H7 gives the harness-backed Think its actions. An approval-gated or durable-pause action's call waits in the transcript as an approval request.
pendingApprovals()lists it with its descriptor, andapproveExecution()/rejectExecution()decide it by submitting an approval answer to the session. The approved call runs through the action ledger in its tool step. The ledger's runner moves out of the Think class intothink/src/action-run.ts, so both Thinks call one function. The harness side is the internalThinkHarness.pendingApprovals(session), which lists the tool calls inapproval-requestedon the session's latest reply.The harness stores no descriptor: one asked in this isolate is kept in memory, and after a restart it is computed again from the action and the call's input (Q5 (b), no new tool field). A durable-pause action asks for approval like an approval-gated one when its host has no
parkDurablePause, which is the case on the harness. The class still parks decision runs until E4 (#3351), which moves the class onto this path and carries itsactpause_decisions forward. This PR merges with E4 (Q6): until then, the harness-backed shell is its only caller.Validated: a new
harness-actions.test.tson the harness-backed Think covers listing with the descriptor, approving (runs once, and deciding again runs nothing), rejecting a durable-pause call (not run,output-denied), and listing the same descriptor after a reset, then approving. Think's action suites pass on the class (82). On the harness config,actions-durable-pausestays at 2 of 56 passing: its tests pin the class's decision runs, which E4 replaces.pnpm run checkis clean apart from the knownexamples/streamdown errors. Cost: no new rows. Listing reads the latest leaf, and an approval adds one operation, as any tool answer does.