{"record":{"id":"460548f46eb69e83","repo":"zed-industries/zed","slug":"unsupported-argument","errorCode":null,"errorMessage":"unsupported argument: {:?}","messagePattern":"unsupported argument: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote/src/transport/ssh.rs","lineNumber":1721,"sourceCode":"                } else {\n                    anyhow::bail!(\"Missing port forward format\");\n                }\n            }\n\n            for a in ALLOWED_ARGS {\n                if arg == *a {\n                    args.push(arg);\n                    if let Some(next) = tokens.next() {\n                        args.push(next);\n                    }\n                    continue 'outer;\n                } else if arg.starts_with(a) {\n                    args.push(arg);\n                    continue 'outer;\n                }\n            }\n            if arg.starts_with(\"-\") || hostname.is_some() {\n                anyhow::bail!(\"unsupported argument: {:?}\", arg);\n            }\n            let mut input = &arg as &str;\n            // Destination might be: username1@username2@ip2@ip1\n            if let Some((u, rest)) = input.rsplit_once('@') {\n                input = rest;\n                username = Some(u.to_string());\n            }\n\n            // Handle port parsing, accounting for IPv6 addresses\n            // IPv6 addresses can be: 2001:db8::1 or [2001:db8::1]:22\n            if input.starts_with('[') {\n                if let Some((rest, p)) = input.rsplit_once(\"]:\") {\n                    input = rest.strip_prefix('[').unwrap_or(rest);\n                    port = p.parse().ok();\n                } else if input.ends_with(']') {\n                    input = input.strip_prefix('[').unwrap_or(input);\n                    input = input.strip_suffix(']').unwrap_or(input);\n                }","sourceCodeStart":1703,"sourceCodeEnd":1739,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/remote/src/transport/ssh.rs#L1703-L1739","documentation":"Thrown while tokenizing a user-supplied SSH command string when an argument begins with `-` (or appears after the hostname) and is not in the ALLOWED_ARGS whitelist, is not an option-with-value like `-l`, and is not a `-L` port forward. The option string itself (shown via {:?}) is the offending input; parsing stops because unrecognized options could change SSH semantics and are rejected for safety.","triggerScenarios":"Thrown at crates/remote/src/transport/ssh.rs:1721 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unsupported flag from the SSH connection options in Zed settings","Use only arguments from the allowed set (e.g. -p, -i, -o, -L)","Put advanced options in ~/.ssh/config instead of passing them as CLI args"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}