Skip to content

think: deprecate createExecuteTool in favour of the Workspace exec tool - #2565

Merged
mattzcarey merged 1 commit into
deprecate-shell/6-deprecate-shellfrom
deprecate-shell/7-think-exec-tools
Oct 14, 2026
Merged

mattzcarey merged 1 commit into
deprecate-shell/6-deprecate-shellfrom
deprecate-shell/7-think-exec-tools

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Deprecates Think's codemode execute tool (createExecuteTool and createExecuteRuntime). The replacement is the exec tool Think already gets from @cloudflare/computer once the Workspace has a JavaScript backend.

Both tools do the same job: the model writes code, and the tool runs it in a Dynamic Worker. They differ in what the code can reach.

  • execute (codemode): the agent's tools are globals (tools.*, cdp.*).
  • exec (Computer): the code is an ordinary module. It reads files through node:fs, and it can import the agent's tools from a ws:tools module if you add one to the backend:
import { createToolBindings } from "@cloudflare/computer/modules/tools";
import { forAISDKTools } from "@cloudflare/computer/tools/ai-sdk";

new WorkerJavaScriptBackend({
  id: "js",
  loader: this.env.LOADER,
  modules: { "ws:tools": createToolBindings(forAISDKTools(() => this.getTools())) }
});
// code the model runs with exec
import { getWeather } from "ws:tools";
export default async () => (await getWeather({ city: "Lisbon" })).text;

There's no loop here. exec is never exported from ws:tools, and neither are the workspace file tools, so code can't start another run. ws:tools only carries the agent's own tools (getTools()). Tools that need approval or run in the browser are left out too.

Codemode is on its way out, so this marks the old tool deprecated. It keeps working until it's removed along with codemode. Think gets no new API: wiring ws:tools is plain @cloudflare/computer setup on the Workspace.

Tests ran: think workers suite, including new tests where exec code imports a getTools() tool from ws:tools, fails to import read, and reads files through node:fs.

ws:tools and forAISDKTools shipped in @cloudflare/computer@0.5.1 (cloudflare/computer#216 and cloudflare/computer#229), and the tests run against that release.

Stacked on #2564.


Stack (merge in order, or merge the top to land them all together):

  1. examples(harnesses): move to @cloudflare/computer 0.5.1 #2559 examples(harnesses): move to @cloudflare/computer 0.5.1
  2. think, agents: work in a @cloudflare/computer Workspace #2560 think, agents: work in a @cloudflare/computer Workspace
  3. think: use the @cloudflare/computer workspace tools #2561 think: use the @cloudflare/computer workspace tools
  4. think: drop @cloudflare/shell #2562 think: drop @cloudflare/shell
  5. examples, docs: move off @cloudflare/shell #2563 examples, docs: move off @cloudflare/shell
  6. shell: deprecate in favour of @cloudflare/computer #2564 shell: deprecate in favour of @cloudflare/computer
  7. think: deprecate createExecuteTool in favour of the Workspace exec tool #2565 (this PR) think: deprecate createExecuteTool in favour of the Workspace exec tool

@changeset-bot

changeset-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d0b8a85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudflare/think Minor
@cloudflare/agent-think Patch

Not sure what this means? Click here to learn what changesets are.

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

devin-ai-integration[bot]

This comment was marked as resolved.

@agent-think

agent-think Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (5e0622cc → 156fea8f, workflow run)

@mattzcarey
mattzcarey added this pull request to stack #2566 October 12, 2026 11:52
@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

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

@cloudflare/ai-chat

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

@cloudflare/codemode

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

hono-agents

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

@cloudflare/shell

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

@cloudflare/think

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

@cloudflare/voice

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

@cloudflare/worker-bundler

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

commit: 156fea8

@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch 2 times, most recently from b256f5b to 084a4aa Compare October 12, 2026 12:32
@mattzcarey mattzcarey changed the title think: deprecate the execute tool in favour of exec with ws:tools think: deprecate createExecuteTool in favour of the Workspace exec tool Oct 12, 2026
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from 084a4aa to a1dea6d Compare October 12, 2026 14:09
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from a1dea6d to 19a8f42 Compare October 12, 2026 14:11
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from 19a8f42 to 5cf18bf Compare October 12, 2026 16:16
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from 5cf18bf to b8f7bdf Compare October 13, 2026 16:12
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from b8f7bdf to 03d82de Compare October 14, 2026 13:09
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from 03d82de to a26ba1b Compare October 14, 2026 13:12
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch 2 times, most recently from df6b933 to 156fea8 Compare October 14, 2026 15:22
@mattzcarey
mattzcarey force-pushed the deprecate-shell/7-think-exec-tools branch from 156fea8 to d0b8a85 Compare October 14, 2026 15:54
@mattzcarey
mattzcarey merged commit f56cd20 into main Oct 14, 2026
7 checks passed
@mattzcarey
mattzcarey deleted the deprecate-shell/7-think-exec-tools branch October 14, 2026 15:56
@github-actions github-actions Bot mentioned this pull request Oct 14, 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