{"record":{"id":"36f7125ec0c45398","repo":"Hmbown/CodeWhale","slug":"unsupported-runtime-mode-mode-expected-plan","errorCode":null,"errorMessage":"unsupported Runtime mode {mode:?}; expected plan, act, or operate","messagePattern":"unsupported Runtime mode (.+?); expected plan, act, or operate","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/runtime_policy.rs","lineNumber":53,"sourceCode":"                } else {\n                    ApprovalMode::Suggest\n                }\n            });\n        Self {\n            mode: visible_mode(parsed_mode),\n            permission,\n        }\n    }\n\n    /// Validate and normalize a new Runtime request. Legacy aliases are\n    /// accepted as one-way inputs, but only current values are persisted.\n    pub(crate) fn from_request(\n        mode: &str,\n        permission_posture: Option<&str>,\n        auto_approve: Option<bool>,\n    ) -> Result<Self> {\n        let parsed_mode = parse_runtime_mode(mode).ok_or_else(|| {\n            anyhow::anyhow!(\"unsupported Runtime mode {mode:?}; expected plan, act, or operate\")\n        })?;\n        let permission = match permission_posture {\n            Some(value) => ApprovalMode::from_config_value(value).ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"unsupported permission posture {value:?}; expected ask, auto-review, or full-access\"\n                )\n            })?,\n            None if parsed_mode == AppMode::Yolo || auto_approve.unwrap_or(false) => {\n                ApprovalMode::Bypass\n            }\n            None => ApprovalMode::Suggest,\n        };\n        if permission == ApprovalMode::Never {\n            bail!(\"permission posture 'never' is not part of the Runtime product contract\");\n        }\n        Ok(Self {\n            mode: visible_mode(parsed_mode),\n            permission,","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/runtime_policy.rs#L35-L71","documentation":"RuntimePolicy::from_request rejected the requested Runtime mode string: parse_runtime_mode (including legacy aliases) did not recognize it, so only plan/act/operate (or their accepted aliases) are valid.","triggerScenarios":"Thrown at crates/tui/src/runtime_policy.rs:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of plan, act, or operate","Check for typos in the mode string sent by the client"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}