zellij-org/zellij · error · anyhow::Error
Invalid custom exit status: {}
Error message
Invalid custom exit status: {} What it means
Error "Invalid custom exit status: {}" thrown in zellij-org/zellij.
Source
Thrown at zellij-utils/src/ipc/protobuf_conversion.rs:617
Some(server_to_client_msg::Message::UnblockInputThread(_)) => {
Ok(ServerToClientMsg::UnblockInputThread)
},
Some(server_to_client_msg::Message::Exit(exit)) => {
let proto_exit_reason = ProtoExitReason::try_from(exit.exit_reason)
.ok()
.ok_or_else(|| anyhow!("Invalid exit_reason"))?;
let exit_reason = match proto_exit_reason {
ProtoExitReason::Error => {
let error_msg =
exit.payload.unwrap_or_else(|| "Protobuf error".to_string());
ExitReason::Error(error_msg)
},
ProtoExitReason::CustomExitStatus => {
let status_str = exit.payload.unwrap_or_else(|| "0".to_string());
let status = status_str
.parse::<i32>()
.map_err(|_| anyhow!("Invalid custom exit status: {}", status_str))?;
ExitReason::CustomExitStatus(status)
},
other => other.try_into()?,
};
Ok(ServerToClientMsg::Exit { exit_reason })
},
Some(server_to_client_msg::Message::Connected(_)) => Ok(ServerToClientMsg::Connected),
Some(server_to_client_msg::Message::Log(log)) => {
Ok(ServerToClientMsg::Log { lines: log.lines })
},
Some(server_to_client_msg::Message::LogError(log_error)) => {
Ok(ServerToClientMsg::LogError {
lines: log_error.lines,
})
},
Some(server_to_client_msg::Message::SwitchSession(switch)) => {
Ok(ServerToClientMsg::SwitchSession {View on GitHub (pinned to e839bfffa5)
Solutions
- Validate the value against the allowed enum range before constructing the message.
- Ensure client and server use matching protobuf definitions; regenerate bindings if versions differ.
When it happens
Trigger: Occurs when a protobuf enum value received over IPC has no matching variant; conversion rejects the unknown value.
Common situations: Typical of version skew between client and server, or a malformed/corrupted IPC message.
AI-assisted analysis of zellij-org/zellij@e839bfffa5 (2026-08-19).
Data as JSON: /api/errors/adc16ccbea3395f6.
Report an issue: GitHub.