Skip to content

Accept the hosted workspace alias as Claude stdio cwd - #793

Merged
SaladDay merged 1 commit into
mainfrom
accept-the-hosted-workspace-alias-as-claude-stdio-cwd
Oct 20, 2026
Merged

SaladDay merged 1 commit into
mainfrom
accept-the-hosted-workspace-alias-as-claude-stdio-cwd

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

End-to-end acceptance on a microsandbox node: a Claude Code Session with a stdio MCP server (cwd: "/workspace") failed every turn with runtime_preparation_failed. Codex passed the same case.

Core admission compares the stdio cwd with the Environment's declared workspace directory, which is /workspace for hosted Environments. The Claude adapter compared it with the bound root, /environment/workspace, of which /workspace is a bind mount.

Change

prepareRuntimeMCP checks cwd against LocalEnvironment.WorkspaceDirectory, the same value Core admitted. The binding has already verified that this directory is the bound root or the hosted /workspace alias. Native still starts the server in its own workspace directory. The cwd parameter is gone.

The contract in contracts/agents-api/execution-tools.md is unchanged.

Checks

  • go test ./internal/agent/claudesdk/
  • go vet ./... (apps/daemon)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay merged commit 5b17e5e into main Oct 20, 2026
21 checks passed
@SaladDay
SaladDay deleted the accept-the-hosted-workspace-alias-as-claude-stdio-cwd branch October 20, 2026 05:41
Core admits a Claude Code stdio MCP cwd against the Environment's declared workspace directory, which is /workspace for hosted Environments. The daemon compared it with the bound root (/environment/workspace in microsandbox), so every hosted stdio server failed runtime preparation. The adapter now checks the same declared directory; the bound root and its /workspace alias are one directory, and native still starts the server there.
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