Skip to content

[Agents] Move Code Mode to a concept and a Runtime section - #35060

Open
mattzcarey wants to merge 2 commits into
productionfrom
docs/agents-code-mode
Open

mattzcarey wants to merge 2 commits into
productionfrom
docs/agents-code-mode

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Code Mode moves out of Tools. A new concept page, /agents/concepts/code-mode/, explains why an agent lets the model write code that calls tools, and a new Runtime section, /agents/runtime/code-mode/, covers how to run that code. The nine tools/codemode/* pages and the Code Mode MCP server guide are removed, with redirects to the new pages.

  • Concept: one program instead of many tool calls, tools as codemode:* modules (how an agent gets many more tools), and the sandbox kept apart from the credentials. It covers Code Mode in the agent (recommended) and on an MCP server (search and execute), and when to call tools directly.
  • Runtime > Code Mode: an overview, Run code with Computer (CodemodeBackend, host modules, codemode:tools, MCP tools, an API module, a container from code, approvals with ctx.interrupt()), and a page that maps @cloudflare/codemode (createCodeTool(), DynamicWorkerExecutor, connectors, the durable runtime) to Computer. The overview links to Execution for skill scripts.
  • The human-in-the-loop Code Mode section uses ctx.interrupt() instead of the durable runtime from @cloudflare/codemode, and the AI Search human-in-the-loop tutorial is rebuilt on Computer.
  • Links to the removed pages are updated across Agents, Sandbox, Dynamic Workers, Workers, AI Search, Cloudflare One, and older changelog entries.

What changed from the approved version: it is rebased onto production on its own (it was stacked on #35056, which is closed), so links that pointed at #35056's /agents/tools/workspace/ page now point at /agents/tools/filesystem/. Skill execution stays at /agents/skills/execution/ (owned by #35544): this PR no longer moves that page, redirects it, or edits the Skills pages. Links to the redirected Code Mode URLs are replaced with their destinations, which fixes the failing build. The concept page's wording is plainer and its sidebar order no longer collides with the Sessions concept. GitHub kept the earlier approval, but it covers the version before this rebase, so it needs a fresh look.

pnpm run build, pnpm run lint:nimbus, and bin/validate-redirects.ts pass locally. The Computer and human-in-the-loop samples compile with tsc --strict against @cloudflare/[email protected] and [email protected]. It merges with #35542, #35544, #35545, #35548, #35550, and #35568 in either order: the only shared files are public/__redirects (different lines), harnesses/think/tools.mdx and harnesses/think/actions.mdx (one link each).

@github-actions github-actions Bot added product:workers Related to Workers product product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:ai-search product:sandbox product:dynamic-workers product:access labels Nov 9, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-agents-code-mode.previews.developers.cloudflare.com (commit 20e6d84)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8e73c052.previews.developers.cloudflare.com 20e6d84 2026-11-24T20:01:13.523Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://ad000e0b.previews.developers.cloudflare.com fa007d7 2026-11-24T12:28:00.227Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
aa750ef 2026-11-11T11:14:55.329Z View logs ↗
  • Build: Failed ❌

View logs ↗
ca4ef7f 2026-11-10T12:07:10.935Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2bd9de32.previews.developers.cloudflare.com aefa2c4 2026-11-09T19:47:28.948Z Visit the dashboard ↗

@mattzcarey

Copy link
Copy Markdown
Member Author

/draft-never-stale

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /agents/model-context-protocol/guides/build-codemode-mcp-server/
  • /agents/tools/codemode/ai-sdk/
  • /agents/tools/codemode/api-reference/
  • /agents/tools/codemode/browser/
  • /agents/tools/codemode/durable-runtime/
  • /agents/tools/codemode/how-it-works/
  • /agents/tools/codemode/
  • /agents/tools/codemode/mcp/
  • /agents/tools/codemode/openapi/
  • /agents/tools/codemode/tanstack-ai/

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Worker Preview URL: https://gh-docs-agents-code-mode.previews.developers.cloudflare.com
Worker Preview Deployment URL: https://3a47fb2d.previews.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/tools/codemode/api-reference/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/api-reference/
https://developers.cloudflare.com/ai-search/how-to/human-in-the-loop-knowledge-base/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/ai-search/how-to/human-in-the-loop-knowledge-base/
https://developers.cloudflare.com/agents/model-context-protocol/guides/build-codemode-mcp-server/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/model-context-protocol/guides/build-codemode-mcp-server/
https://developers.cloudflare.com/agents/tools/codemode/how-it-works/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/how-it-works/
https://developers.cloudflare.com/agents/runtime/code-mode/computer/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/runtime/code-mode/computer/
https://developers.cloudflare.com/agents/tools/codemode/durable-runtime/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/durable-runtime/
https://developers.cloudflare.com/agents/tools/codemode/ai-sdk/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/ai-sdk/
https://developers.cloudflare.com/agents/tools/codemode/openapi/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/openapi/
https://developers.cloudflare.com/agents/tools/codemode/browser/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/browser/
https://developers.cloudflare.com/agents/tools/codemode/mcp/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/mcp/
https://developers.cloudflare.com/agents/tools/codemode/tanstack-ai/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/tanstack-ai/
https://developers.cloudflare.com/agents/concepts/agentic-patterns/human-in-the-loop/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/concepts/agentic-patterns/human-in-the-loop/
https://developers.cloudflare.com/agents/concepts/code-mode/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/concepts/code-mode/
https://developers.cloudflare.com/agents/tools/codemode/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/tools/codemode/
https://developers.cloudflare.com/agents/runtime/code-mode/legacy/ https://gh-docs-agents-code-mode.previews.developers.cloudflare.com/agents/runtime/code-mode/legacy/

@mattzcarey
mattzcarey force-pushed the docs/agents-code-mode branch from aefa2c4 to ca4ef7f Compare November 10, 2026 12:02
@mattzcarey
mattzcarey marked this pull request as ready for review November 11, 2026 11:09
@mattzcarey

Copy link
Copy Markdown
Member Author

this removes a bunch of the codemode docs which were talking about specific features of the codemode SDK. Need to align on whether we are keeping those features or moving entirely to recommending cloudflare/computer

@mbullock1986 mbullock1986 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a rules PM perspective I do not think anything is directly related to me / blocking. So approving from Rules side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:access product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:ai-search product:changelog product:dynamic-workers product:sandbox product:workers Related to Workers product size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants