pub enum StartupFailureReason {
Show 17 variants
OrgPinApiKeyConflict,
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.
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, or the pin names no organization.
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.
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
impl Clone for StartupFailureReason
Source§fn clone(&self) -> StartupFailureReason
fn clone(&self) -> StartupFailureReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more