Skip to content

H7: the harness-backed Think's actions wait for approval in the transcript - #3331

Merged
mattzcarey merged 5 commits into
mainfrom
slim/harness-h7
Nov 27, 2026
Merged

mattzcarey merged 5 commits into
mainfrom
slim/harness-h7

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

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, and approveExecution() / 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 into think/src/action-run.ts, so both Thinks call one function. The harness side is the internal ThinkHarness.pendingApprovals(session), which lists the tool calls in approval-requested on 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 its actpause_ decisions forward. This PR merges with E4 (Q6): until then, the harness-backed shell is its only caller.

Validated: a new harness-actions.test.ts on 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-pause stays at 2 of 56 passing: its tests pin the class's decision runs, which E4 replaces. pnpm run check is clean apart from the known examples/ streamdown errors. Cost: no new rows. Listing reads the latest leaf, and an approval adds one operation, as any tool answer does.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: deaaaa2

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@3331

@cloudflare/ai-chat

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

@cloudflare/codemode

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

hono-agents

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

@cloudflare/shell

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

@cloudflare/think

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

@cloudflare/voice

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

@cloudflare/worker-bundler

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

commit: deaaaa2

@agent-think

agent-think Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (506500e4 → deaaaa21, workflow run)

@mattzcarey
mattzcarey force-pushed the slim/harness-h7 branch 3 times, most recently from 6b4ae91 to e490f1c Compare November 27, 2026 01:27
@mattzcarey
mattzcarey changed the base branch from slim/harness-h2 to main November 27, 2026 02:00
@mattzcarey
mattzcarey changed the base branch from main to slim/harness-h2 November 27, 2026 02:00
Base automatically changed from slim/harness-h2 to main November 27, 2026 02:06
@mattzcarey mattzcarey changed the title H7 (draft): one parked approval in ThinkHarness's step loop H7: the harness-backed Think's actions wait for approval in the transcript Nov 27, 2026
@mattzcarey
mattzcarey marked this pull request as ready for review November 27, 2026 02:54
devin-ai-integration[bot]

This comment was marked as resolved.

@mattzcarey
mattzcarey changed the base branch from main to slim/harness-ai6 November 27, 2026 03:12
devin-ai-integration[bot]

This comment was marked as resolved.

Base automatically changed from slim/harness-ai6 to main November 27, 2026 03:21
devin-ai-integration[bot]

This comment was marked as resolved.

@mattzcarey
mattzcarey force-pushed the slim/harness-h7 branch 5 times, most recently from 9c7d64a to 66cc831 Compare November 27, 2026 07:35
@mattzcarey
mattzcarey merged commit 65163d7 into main Nov 27, 2026
26 checks passed
@mattzcarey
mattzcarey deleted the slim/harness-h7 branch November 27, 2026 09:45
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