Add MCP startup failure details to Oz errors#12101
Conversation
90a5804 to
af0d2ef
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds structured MCP startup failure details to Oz/cloud-agent task errors, including failed server names and sanitized reason categories while avoiding raw MCP logs. The implementation updates startup wait state tracking, error classification, and targeted failure-message storage in the templatable MCP manager.
Concerns
- One non-blocking suggestion: the broad
not foundsanitizer match can misclassify the new installation-missing reason as a missing command. - Security pass: no security findings.
- Spec alignment: no approved or repository spec context was available for this PR.
Verdict
Found: 0 critical, 0 important, 1 suggestions
Approve with nits
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| "PATH was unavailable when Warp tried to launch the MCP command".to_string() | ||
| } | ||
| _ if lower.contains("no such file") | ||
| || lower.contains("not found") |
There was a problem hiding this comment.
💡 [SUGGESTION] This generic not found match also rewrites the new MCP server installation could not be found reason as a missing command, which sends users toward PATH/command debugging instead of the missing installation; handle that reason first or narrow this match to command/path failures.
Co-Authored-By: Oz <oz-agent@warp.dev>
af0d2ef to
02f891d
Compare
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds per-server MCP startup failure details to Oz agent errors and keeps raw MCP logs out of user-facing task messages.
Concerns
- The newly stored PATH failure reason does not match the sanitizer branch, so that failure mode still falls back to the generic startup message instead of the intended actionable detail.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| _ if lower.contains("path required") | ||
| || lower.contains("path not available") | ||
| || lower.contains("unknown path") => |
There was a problem hiding this comment.
PATH was unavailable when trying to launch the MCP command, which does not match any of these substrings and therefore falls through to the generic fallback instead of surfacing the actionable PATH detail.
| _ if lower.contains("path required") | |
| || lower.contains("path not available") | |
| || lower.contains("unknown path") => | |
| _ if lower.contains("path required") | |
| || lower.contains("path not available") | |
| || lower.contains("path was unavailable") | |
| || lower.contains("unknown path") => |
Description
Adds safe, actionable MCP startup details to Oz/cloud-agent task errors. When requested or profile MCP servers fail to start, the agent driver now accumulates failed/timed-out server names and sanitized reason categories instead of reporting only a generic MCP startup failure.
The reported task error intentionally does not include MCP logs or raw process output, but it does include guidance to check the named server configuration, command/URL, required env vars/secrets, and whether the command exists in the cloud agent environment.
Linked Issue
Slack request: MCP server startup failures in cloud agent runs should include more actionable info without leaking sensitive logs.
ready-to-specorready-to-implement.Testing
cargo test --manifest-path /workspace/warp/Cargo.toml -p warp mcp_startup_failed_includes_safe_server_detailscargo test --manifest-path /workspace/warp/Cargo.toml -p warp ai::agent_sdk::driver::error_classification::testsI have manually tested my changes locally with
./script/runScreenshots / Videos
Not applicable; this is cloud-agent error reporting behavior without a local UI change.
Agent Mode
CHANGELOG-OZ: MCP startup failures in cloud agent runs now show failed server names and safe, actionable reasons without including sensitive MCP logs.
Co-Authored-By: Oz oz-agent@warp.dev
Conversation: https://staging.warp.dev/conversation/93f382d7-d946-4c83-9db9-83ca659f2933
Run: https://oz.staging.warp.dev/runs/019e8a3b-ba1f-7802-936f-4d2ba28b81e3
This PR was generated with Oz.