{"record":{"id":"80abf9e4b723529d","repo":"pulumi/pulumi","slug":"the-pulumi-cli-does-not-support-remote-operations","errorCode":null,"errorMessage":"The Pulumi CLI does not support remote operations. Please upgrade.","messagePattern":"The Pulumi CLI does not support remote operations\\. Please upgrade\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdk/nodejs/automation/localWorkspace.ts","lineNumber":1107,"sourceCode":"    /**\n     * A hook executed after every command. Called with the stack name. An\n     * extensibility point to perform workspace cleanup (CLI operations may\n     * create/modify a `Pulumi.stack.yaml`) {@link LocalWorkspace} does not\n     * utilize this extensibility point.\n     */\n    async postCommandCallback(_: string): Promise<void> {\n        return;\n    }\n\n    private async checkRemoteSupport() {\n        const optOut = !!this.envVars[SKIP_VERSION_CHECK_VAR] || !!process.env[SKIP_VERSION_CHECK_VAR];\n        // If remote was specified, ensure the CLI supports it.\n        if (!optOut && this.isRemote) {\n            // See if `--remote` is present in `pulumi preview --help`'s output.\n            const previewResult = await this.runPulumiCmd([\"preview\", \"--help\"]);\n            const previewOutput = previewResult.stdout.trim();\n            if (!previewOutput.includes(\"--remote\")) {\n                throw new Error(\"The Pulumi CLI does not support remote operations. Please upgrade.\");\n            }\n        }\n    }\n\n    private async runPulumiCmd(args: string[]): Promise<CommandResult> {\n        let envs: { [key: string]: string } = {};\n        if (this.pulumiHome) {\n            envs[\"PULUMI_HOME\"] = this.pulumiHome;\n        }\n        if (this.isRemote) {\n            envs[\"PULUMI_EXPERIMENTAL\"] = \"true\";\n        }\n        envs = { ...envs, ...this.envVars };\n        return this.pulumiCommand.run(args, this.workDir, envs);\n    }\n\n    /**\n     * @internal","sourceCodeStart":1089,"sourceCodeEnd":1125,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/nodejs/automation/localWorkspace.ts#L1089-L1125","documentation":"LocalWorkspace validates remote support by running `pulumi preview --help` and checking whether the `--remote` flag appears in the help output. When remote options are used (remote: true in StackSettings/LocalWorkspaceOptions) and the connected CLI does not advertise --remote, the SDK throws this error telling you to upgrade, because remote operations (SSI/pulumi deployments remote execution) require a sufficiently new CLI.","triggerScenarios":"Creating a LocalWorkspace/Stack with remote: true (or RemoteWorkspace/RemoteStack) while the CLI's `pulumi preview --help` output lacks `--remote`, typically CLI < 3.104 era; also when PULUMI_AUTOMATION_API_OPT_OUT_REMOTE is unset so the check runs.","commonSituations":"Using RemoteStack against an old self-installed CLI; containers with pre-remote CLIs; organizations that self-manage CLI versions and lag behind the SSI/remote features.","solutions":["Upgrade the Pulumi CLI to a version supporting remote operations (latest)","If remote support is not needed, remove `remote: true` from workspace/stack options","Temporarily opt out of the remote check by setting the PULUMI_AUTOMATION_API_OPT_OUT_REMOTE environment variable (only if you know remote commands are unnecessary)"],"exampleFix":"// before\nconst stack = await LocalWorkspace.createOrSelectStack({\n  stackName: \"org/proj/stack\",\n  workDir: \".\",\n  remote: true,\n}); // old CLI -> throws\n// after\n$ pulumi version\n3.130.0 // upgrade CLI, then same code succeeds","handlingStrategy":"validation","validationCode":"const help = await (stack.workspace as any).runPulumiCmd([\"preview\", \"--help\"]);\nif (usingRemote && !help.stdout.includes(\"--remote\")) {\n  throw new Error(\"Remote operations require a newer Pulumi CLI\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  const stack = await LocalWorkspace.createOrSelectStack(remoteOpts);\n} catch (err) {\n  if ((err as Error).message.includes(\"does not support remote operations\")) {\n    // prompt CLI upgrade or fall back to local execution\n  } else throw err;\n}","preventionTips":["Use a CLI that supports remote operations (recent release) before enabling remote: true","Only set remote options when you actually use RemoteWorkspace/SSI","Check `pulumi preview --help | grep -- --remote` in environment setup","Set PULUMI_AUTOMATION_API_OPT_OUT_REMOTE=1 only deliberately, when remote is unused"],"tags":["automation-api","remote-operations","cli","version-check"],"backgroundTag":"pulumi-cli-version-too-old","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}