Skip to content

think: deprecate the execute tool in favour of exec with ws:tools - #2558

Closed
mattzcarey wants to merge 1 commit into
shell-deprecatefrom
think-tools-module
Closed

mattzcarey wants to merge 1 commit into
shell-deprecatefrom
think-tools-module

Conversation

@mattzcarey

Copy link
Copy Markdown
Member

Deprecates createExecuteTool and createExecuteRuntime. Code execution moves to the Workspace: a JavaScript backend with a ws:tools module lets code the model runs with exec import the agent's tools, and read files through node:fs.

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())) }
});

The execute tool gives code its tools as codemode globals (tools.*, cdp.*), and codemode is on its way out. With ws:tools, the agent's tools are ordinary module imports and files come from node:fs. That's plain @cloudflare/computer setup on the Workspace, so Think adds no new API. The old execute tool keeps working until it's removed along with codemode.

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

Draft until cloudflare/computer#216 and cloudflare/computer#229 are released. Until then the tests run against a preview build of Computer. When the release lands, the dev dependency moves to the released version.

@changeset-bot

changeset-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 78c10d2

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

@agent-think

agent-think Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (76d5ff6f → 78c10d2c, workflow run)

@mattzcarey
mattzcarey deleted the branch shell-deprecate October 12, 2026 11:49
@mattzcarey

Copy link
Copy Markdown
Member Author

Replaced by a cleaner stack, #2559 to #2565.

@mattzcarey mattzcarey closed this Oct 12, 2026
@mattzcarey
mattzcarey deleted the think-tools-module branch October 12, 2026 11:49
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