Skip to content

Fall back to non-UI results when cloud notebook deployment fails#167

Merged
rhennigan merged 5 commits into
mainfrom
166-wolframlanguageevaluator-tool-fails-with-agenttoolsinternalpath-error-on-windows-11-when-used-with-claude-desktop
Apr 20, 2026
Merged

Fall back to non-UI results when cloud notebook deployment fails#167
rhennigan merged 5 commits into
mainfrom
166-wolframlanguageevaluator-tool-fails-with-agenttoolsinternalpath-error-on-windows-11-when-used-with-claude-desktop

Conversation

@rhennigan
Copy link
Copy Markdown
Member

Summary

  • Fixes WolframLanguageEvaluator tool fails with AgentTools::Internal::Path error on Windows 11 when used with Claude Desktop #166: WolframLanguageEvaluator (and WolframAlpha) surfaced an internal failure when CloudDeploy failed — notably on Windows with Claude Desktop — instead of degrading to their standard text/image output.
  • Consolidates cloud notebook deployment for UI-enhanced tool results into a shared deployCloudNotebookForMCPApp helper in Kernel/UIResources.wl.
  • Adds a session flag $deployCloudNotebooks (initialized from $CloudConnected) that the helper flips to False after any deployment failure, disabling further deployment attempts for the rest of the session.
  • WolframAlpha has no text-only fallback app view, so its entry in $toolUIAssociations is now RuleDelayed and resolves to None when $deployCloudNotebooks is False — the client no longer sees it as a UI-enabled tool in that state.
  • Updates Tests/MCPApps.wlt, Tests/WolframAlpha-UI.wlt, and Tests/WolframLanguageEvaluator-UI.wlt to cover the new flag, the conditional UI association, and the deploy-disabled fallback paths; drops tests for the removed per-tool $deployedNotebookRoot constants.
  • Updates docs/mcp-apps.md and AGENTS.md to document the new helper, the session flag, and the per-tool fallback behavior.

Test plan

  • Run Tests/MCPApps.wlt — all tests pass, including the new $deployCloudNotebooks and deployCloudNotebookForMCPApp cases.
  • Run Tests/WolframAlpha-UI.wlt and Tests/WolframLanguageEvaluator-UI.wlt — all tests pass, including the new fallback-when-deploy-disabled cases.
  • Manually verify on Windows 11 with Claude Desktop: WolframLanguageEvaluator returns a standard result instead of an internal failure when cloud deployment is unavailable.
  • In a session with $CloudConnected = True, confirm UI-enhanced results still deploy and return notebookUrl in _meta as before.

🤖 Generated with Claude Code

rhennigan and others added 4 commits April 20, 2026 10:35
Consolidates deployment logic into a shared `deployCloudNotebookForMCPApp`
helper and adds a session flag (`$deployCloudNotebooks`) that disables
further deployment attempts after a failure. Previously a failed
`CloudDeploy` (e.g. on Windows with Claude Desktop) surfaced as an
internal failure instead of falling back to the non-UI result.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eployment

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reflect the new $deployCloudNotebooks gating and deployCloudNotebookForMCPApp
helper: Block the flag in UI metadata tests, drop tests for the removed
$deployedNotebookRoot constants, and cover the deploy-disabled fallback paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reflect the new $deployCloudNotebooks session flag, the shared
deployCloudNotebookForMCPApp helper, and the per-tool fallback behavior
in the MCP Apps docs and the UIResources.wl file summary.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent WolframLanguageEvaluator and WolframAlpha from surfacing internal failures when cloud notebook deployment fails, by disabling further deployments for the session and falling back to non-UI results.

Changes:

  • Introduces shared deployCloudNotebookForMCPApp and session flag $deployCloudNotebooks to gate/disable cloud notebook deployment after failures.
  • Updates WolframAlpha and WolframLanguageEvaluator to use the shared helper and to degrade to non-UI outputs when deployment is disabled/fails.
  • Updates tests and docs to cover the new flag, conditional UI association behavior, and fallback paths.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/mcp-apps.md Documents $deployCloudNotebooks, shared deployment helper, and per-tool fallback behavior
AGENTS.md Notes UIResources now includes a shared cloud notebook deployment helper
Kernel/CommonSymbols.wl Exports $deployCloudNotebooks and deployCloudNotebookForMCPApp via Common symbols
Kernel/UIResources.wl Adds $deployCloudNotebooks, conditional $toolUIAssociations entry for WolframAlpha, and shared deployment helper
Kernel/Tools/WolframAlpha.wl Switches UI gating to $deployCloudNotebooks and uses shared deploy helper for UI results
Kernel/Tools/WolframLanguageEvaluator.wl Switches UI gating to $deployCloudNotebooks and uses shared deploy helper for UI results
Tests/MCPApps.wlt Adds coverage for $deployCloudNotebooks, helper behavior, and conditional _meta for WolframAlpha
Tests/WolframAlpha-UI.wlt Adds fallback test when deployment is disabled and tests conditional UI association
Tests/WolframLanguageEvaluator-UI.wlt Adds fallback test when deployment is disabled and removes obsolete $deployedNotebookRoot test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Kernel/Tools/WolframAlpha.wl
Comment thread Kernel/Tools/WolframLanguageEvaluator.wl
Comment thread Kernel/UIResources.wl Outdated
Comment thread Kernel/UIResources.wl
Comment thread Kernel/UIResources.wl
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 15:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rhennigan rhennigan merged commit 1d741c6 into main Apr 20, 2026
5 checks passed
@rhennigan rhennigan deleted the 166-wolframlanguageevaluator-tool-fails-with-agenttoolsinternalpath-error-on-windows-11-when-used-with-claude-desktop branch April 20, 2026 15:30
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.

WolframLanguageEvaluator tool fails with AgentTools::Internal::Path error on Windows 11 when used with Claude Desktop

2 participants