fix: hot-attach to MCP servers that require auth after running .mcp auth <name>

This commit is contained in:
2026-07-17 13:16:25 -06:00
parent 09afdeaf7c
commit f5085a773a
4 changed files with 98 additions and 11 deletions
+10
View File
@@ -1061,4 +1061,14 @@ mod tests {
assert!(!is_auth_required_error(&e));
}
#[test]
fn is_auth_required_error_survives_context_wrapping() {
let e = anyhow!("Auth required, when send initialize request").context(
"MCP server 'github' requires OAuth authentication. \
Run `coyote --auth-mcp github` or `.mcp auth github` in the REPL to authenticate.",
);
assert!(is_auth_required_error(&e));
}
}