Skip to content

docs(mcp): add control-surface fallback guidance (CDP/iPhone/screen)#1352

Open
Andrew Gazelka (andrewgazelka) wants to merge 1 commit into
mainfrom
mcp-control-fallback
Open

docs(mcp): add control-surface fallback guidance (CDP/iPhone/screen)#1352
Andrew Gazelka (andrewgazelka) wants to merge 1 commit into
mainfrom
mcp-control-fallback

Conversation

@andrewgazelka

@andrewgazelka Andrew Gazelka (andrewgazelka) commented Jun 18, 2026

Copy link
Copy Markdown
Member

Adds a CONTROL section to the kernel guide: when a system has no programmatic integration (or a scope-limited one), the kernel can still drive it through a bundled control surface. Documents the three surfaces (browser over CDP, iphone over WDA, screen for the Mac) and recommends CDP first (structured DOM + selector clicks) over pixel-based screen/iphone control.

Motivated by a real session where a scope-limited Slack token blocked the API path and the fallback to a control surface was not signposted in the guide.

(sent by an AI agent via Claude Code)

Note

Add control surface fallback guidance for CDP, iPhone, and screen capture to kernel guide

Adds a CONTROL constant to guide.py describing the three available control surfaces (Chromium via CDP, iPhone via WebDriverAgent, Mac screen capture) and when to use each. The constant is inserted into the _KERNEL_GUIDE block in tools.py between the VERIFY and RESULT_SPLIT sections, so agents receive this guidance at runtime.

Macroscope summarized 3d95241.

When a system has no programmatic integration (or a scope-limited one),
the kernel can still drive it through a control surface. Document the
three bundled surfaces and recommend CDP first (structured DOM, selector
clicks) over screen/iphone pixel control.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AI review found issues in this pull request.

Verdict: patch is incorrect
Confidence: 0.86

The added guidance is runtime-facing model instruction text, and it includes non-awaited async browser calls that would not execute when copied into the notebook kernel. That makes the patch incorrect until the examples are fixed.

  • P2 packages/mcp/ix_notebook_mcp/guide.py:186 Await async browser helpers in the control guide

Comment on lines +186 to +187
"(`import browser`, then `await browser.goto(url)` / `browser.vdom()` / `browser.read()` / "
"`browser.shot()`), the iPhone over WebDriverAgent (`import iphone`: `iphone.tap`, "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Await async browser helpers in the control guide

The new control-surface recipe shows browser.vdom(), browser.read(), and browser.shot() without await, but these helpers are all async functions. In this kernel a bare trailing coroutine is captured as the cell result rather than executed, so an agent following this guidance would get a coroutine repr instead of the DOM/readout/screenshot and the verification/control step would silently not happen. The example should await each browser helper, matching the browser module's own docs.

Suggested change
"(`import browser`, then `await browser.goto(url)` / `browser.vdom()` / `browser.read()` / "
"`browser.shot()`), the iPhone over WebDriverAgent (`import iphone`: `iphone.tap`, "
"(`import browser`, then `await browser.goto(url)` / `await browser.vdom()` / `await browser.read()` / "
"`await browser.shot()`), the iPhone over WebDriverAgent (`import iphone`: `iphone.tap`,

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d9524127c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +186 to +188
"(`import browser`, then `await browser.goto(url)` / `browser.vdom()` / `browser.read()` / "
"`browser.shot()`), the iPhone over WebDriverAgent (`import iphone`: `iphone.tap`, "
"`iphone.swipe`, `iphone.screenshot`), and the Mac itself by screen capture plus synthetic "

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prefix async control examples with await

In a python_exec cell, calls like browser.vdom() or iphone.tap(...) are captured as the final expression's value and are not executed unless they are awaited; they render as coroutine objects instead. Since browser.vdom/read/shot and iphone.tap/swipe/screenshot are all async functions, a user following these new examples will get no DOM read, screenshot, tap, or swipe, so these snippets should include await just like the preceding browser.goto(url) example.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

Blast radius

63 of 1487 checks would rebuild between base 091a3b8 and head 7cef63a.

pie showData title Rebuilt checks by category
  "rust" : 42
  "image" : 15
  "site" : 2
  "agent" : 1
  "blast" : 1
  "eval" : 1
  "lint" : 1
Loading
flowchart LR
  c0["ix-notebook-mcp-module"]
  c1["blast-radius-test"]
  c2["agent-skills"]
  c3["lint"]
  c4["rust-mcp.viewSmoke"]
  c5["site-test"]
  c0 --> k0["agent-skills"]
  c0 --> k2["eval"]
  c0 --> k3["image-development-base"]
  c0 --> k4["image-kernel-dev"]
  c0 --> k5["image-minecraft"]
Loading
changed checks (63)
  • agent-skills
  • blast-radius-test
  • eval
  • image-development-base
  • image-kernel-dev
  • image-minecraft
  • image-minecraft-bedrock
  • image-minecraft-status
  • image-minecraft_1.21.11-fabric
  • image-minecraft_1.21.11-paper
  • image-minecraft_26.1.2-fabric
  • image-minecraft_26.1.2-paper
  • image-minecraft_26w17a-fabric
  • image-minestom
  • image-neovim-ci
  • image-remote-desktop
  • image-symphony-codex
  • image-test-cluster-bootstrap
  • lint
  • rust-mcp.apiSmoke
  • rust-mcp.astlogBundled
  • rust-mcp.beeperBundled
  • rust-mcp.bindDefaultSmoke
  • rust-mcp.bindingsSmoke
  • rust-mcp.browserSmoke
  • rust-mcp.browserVdomSmoke
  • rust-mcp.dashboardLauncherSmoke
  • rust-mcp.dataLibsBundled
  • rust-mcp.engineBundled
  • rust-mcp.evalSmoke
  • rust-mcp.exaBundled
  • rust-mcp.feedSmoke
  • rust-mcp.fffBundled
  • rust-mcp.fleetClusterSmoke
  • rust-mcp.fleetSmoke
  • rust-mcp.gmailLibsBundled
  • rust-mcp.googleAuthBundled
  • rust-mcp.htpyBundled
  • rust-mcp.iphoneBundled
  • rust-mcp.ixGoogleBundled
  • rust-mcp.linearBundled
  • rust-mcp.nixSmoke
  • rust-mcp.noxAutotriageBundled
  • rust-mcp.requirementsSmoke
  • rust-mcp.richSmoke
  • rust-mcp.runtimeSmoke
  • rust-mcp.searchBundled
  • rust-mcp.serverTools
  • rust-mcp.sessionIdentitySmoke
  • rust-mcp.sessionSmoke
  • rust-mcp.shSmoke
  • rust-mcp.slackBundled
  • rust-mcp.sshAuthSockSmoke
  • rust-mcp.strictTypecheck
  • rust-mcp.tuiBundled
  • rust-mcp.vdomPropertiesSmoke
  • rust-mcp.viewSmoke
  • rust-mcp.wedgeSmoke
  • rust-mcp.worktreeSmoke
  • rust-mcp.xBundled
  • rust-mcp.yieldSmoke
  • site-case-tests
  • site-test

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