Hmbown/CodeWhale · error
permission posture 'never' is not part of the Runtime…
Error message
permission posture 'never' is not part of the Runtime product contract
What it means
The Runtime policy parser rejects `ApprovalMode::Never` explicitly: the 'never' permission posture is not part of the Runtime product contract, so a request asking for it fails at parse time in `from_request`. The runtime only supports Suggest, Bypass (via legacy yolo/auto-approve aliases), and the explicitly parsed modes.
Solutions
- Change the permission posture to a supported value (e.g. `suggest` or `bypass`).
- Remove the legacy `yolo`/auto-approve flag if the intent was never-ask, and pick the supported equivalent.
- Migrate the stale config file to the Runtime-supported schema.
Example fix
// before permission = "never" // after permission = "suggest"
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_POSTURES: [&str; 2] = ["suggest", "bypass"];
if !SUPPORTED_POSTURES.contains(&permission.as_str()) { return Err(format!("unsupported permission posture: {permission}")); } Try / catch
match RuntimePolicy::from_request(&req) { Err(e) if e.contains("never") => { eprintln!("{e}; falling back to 'suggest'"); RuntimePolicy::suggest() }, Err(e) => return Err(e), Ok(p) => use(p) } Prevention
- Validate permission config against the runtime's supported values at startup
- Do not copy desktop/CLI approval settings into runtime config unchanged
- Remove legacy 'never'/'yolo' entries when migrating config files
When it happens
Trigger: Constructing runtime policy from a request whose `permission` field is `never`, or whose config resolves to the Never approval mode.
Common situations: Porting a desktop/CLI config that permits `permission = "never"` into the Runtime; a stale settings file still carrying the removed posture.
Related errors
- external credential access is disabled for
- managed external credential access is unsupported for
- a CNB access token is not configured in the Codewhale…
- account_agent_model_unconfigured
- active profile is missing or malformed
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/a4882f49bce747d1.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/runtime_policy.rs:80
pub(crate) fn from_request(
mode: &str,
permission_posture: Option<&str>,
auto_approve: Option<bool>,
) -> Result<Self> {
let parsed_mode = parse_runtime_mode(mode).ok_or_else(|| {
anyhow::anyhow!("unsupported Runtime mode {mode:?}; expected plan, act, or operate")
})?;
let permission = match permission_posture {
Some(value) => ApprovalMode::from_config_value(value).ok_or_else(|| {
anyhow::anyhow!(
"unsupported permission posture {value:?}; expected ask, auto-review, or full-access"
)
})?,
None if legacy_yolo_alias(mode) || auto_approve.unwrap_or(false) => ApprovalMode::Bypass,
None => ApprovalMode::Suggest,
};
if permission == ApprovalMode::Never {
bail!("permission posture 'never' is not part of the Runtime product contract");
}
Ok(Self {
mode: parsed_mode,
permission,
})
}
#[must_use]
pub(crate) fn mode_setting(self) -> &'static str {
self.mode.as_setting()
}
#[must_use]
pub(crate) fn permission_wire(self) -> &'static str {
approval_wire(self.permission)
}
#[must_use]View on GitHub (pinned to 73e0f67d83)