Skip to main content

StartupFailureReason

Enum StartupFailureReason 

Source
pub enum StartupFailureReason {
Show 18 variants OrgPinApiKeyConflict, ProviderNotAllowed, OrgVerifyFailed, OrgPinMismatch, ManagedSettingsInvalid, RemoteSettingsRequiredUnavailable, GatewaySigninRequired, GatewayAccessDenied, ProxyInvalid, TempDirUnusable, CwdUnavailable, ShellToolMissing, SessionHeldByBackground, WorktreeResumeRefused, WorktreeUnverified, CliVersionTooOld, BypassRoot, Unknown(String),
}
Expand description

Why Claude Code refused to start, carried as ResultMessage::startup_failure_reason so a host can offer the fix instead of a retry (CLI 2.1.274+).

Variants§

§

OrgPinApiKeyConflict

Managed settings pin a first-party or Cloud gateway sign-in, and an Anthropic API key or auth token is configured instead.

§

ProviderNotAllowed

Managed settings list the API providers this machine may use (allowedProviders), and the session is set up for one that is not listed (CLI 2.1.285+).

§

OrgVerifyFailed

The sign-in’s organization could not be verified against the pin (network, or a revoked token).

§

OrgPinMismatch

The sign-in belongs to an organization the pin does not allow.

§

ManagedSettingsInvalid

Managed policy settings could not be read, the pin names no organization, or managed model settings (deniedModels, or an availableModels list matched exactly) block the default model and leave no allowed model to use instead.

§

RemoteSettingsRequiredUnavailable

Managed settings the organization requires could not be loaded.

§

GatewaySigninRequired

The Cloud gateway ended this sign-in.

§

GatewayAccessDenied

The Cloud gateway refused managed settings for this account.

§

ProxyInvalid

A proxy setting is not a complete URL.

§

TempDirUnusable

The per-user temp directory is unsafe or could not be created.

§

CwdUnavailable

The working directory was deleted, moved or cannot be read.

§

ShellToolMissing

Windows has no shell tool: Git Bash is missing, and PowerShell is missing or turned off by CLAUDE_CODE_USE_POWERSHELL_TOOL.

§

SessionHeldByBackground

The conversation to resume or continue is running as a background session.

§

WorktreeResumeRefused

The resume was refused because the session’s worktree failed its safety checks or the resume was launched from inside it; errors says whether a re-run continues without the worktree.

§

WorktreeUnverified

The session’s worktree could not be verified right now; retrying may succeed.

§

CliVersionTooOld

This Claude Code version is below the minimum Anthropic requires.

§

BypassRoot

Bypass permissions mode was requested while running as root.

§

Unknown(String)

A cause not yet known to this version of the crate.

Implementations§

Trait Implementations§

Source§

impl Clone for StartupFailureReason

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StartupFailureReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StartupFailureReason

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for StartupFailureReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for StartupFailureReason

Source§

impl From<&str> for StartupFailureReason

Source§

fn from(s: &str) -> Self

Converts to this type from the input type.
Source§

impl Hash for StartupFailureReason

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for StartupFailureReason

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for StartupFailureReason

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StartupFailureReason

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.