zed-industries/zed · error
unexpected non-command action in inlay hint label part
Error message
unexpected non-command action in inlay hint label part
What it means
A validation guard in the LSP inlay-hint label part mapper: while converting protocol label parts into GPUI elements, a part arrived with a `command` field whose serialized action did not decode into any known Zed action. The `Some(command)` arm tries to resolve the command to an Action and this sentinel error rejects the unexpected/non-command payload instead of silently dropping it. The input at fault is the command payload inside a single label part sent by the language server.
Source
Thrown at crates/project/src/lsp_command.rs:4184
range.end.row,
range.end.column,
)),
),
},
)),
None => None,
}
},
command: match part.command {
Some(command) => {
let action = LspStore::deserialize_code_action(command)
.context("invalid command in inlay hint label part")?;
match action.lsp_action {
LspAction::Command(command) => {
Some((action.server_id, command))
}
LspAction::Action(_) | LspAction::CodeLens(_) => {
anyhow::bail!(
"unexpected non-command action in inlay hint label part"
)
}
}
}
None => None,
},
});
}
InlayHintLabel::LabelParts(label_parts)
}
},
padding_left: message_hint.padding_left,
padding_right: message_hint.padding_right,
kind: message_hint
.kind
.as_deref()View on GitHub (pinned to 9d272b0363)
Solutions
- Treat the unresolvable command as a no-op and render the label part without the action, downgrading this error to a logged warning
- Update the action deserialization table so the command name/method sent by the server maps to a known Action
- Report the offending language server and command payload upstream so the mapping can be added
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/project/src/lsp_command.rs:4184 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-09-12).
Data as JSON: /api/errors/43a34ac88c7851de.
Report an issue: GitHub.