zellij-org/zellij · error · anyhow::Error

NewTiledPluginPane missing plugin

Error message

NewTiledPluginPane missing plugin

What it means

Conversion of the protobuf IPC action NewTiledPluginPane into the internal Action requires the nested `plugin` message (location + config of the wasm plugin to open as a tiled pane). Because `plugin` is a proto3 message field it is Option on the Rust side; an incoming NewTiledPluginPane without it fails here and the pane is never created.

Source

Thrown at zellij-utils/src/ipc/protobuf_conversion.rs:2650

                Ok(crate::input::actions::Action::OverrideLayout {
                    tabs: override_layout_action
                        .tabs
                        .into_iter()
                        .map(|t| t.try_into())
                        .collect::<Result<Vec<_>>>()?,
                    retain_existing_terminal_panes: override_layout_action
                        .retain_existing_terminal_panes,
                    retain_existing_plugin_panes: override_layout_action
                        .retain_existing_plugin_panes,
                    apply_only_to_active_tab: override_layout_action.apply_only_to_active_tab,
                })
            },
            ActionType::QueryTabNames(_) => Ok(crate::input::actions::Action::QueryTabNames),
            ActionType::NewTiledPluginPane(new_tiled_plugin_action) => {
                Ok(crate::input::actions::Action::NewTiledPluginPane {
                    plugin: new_tiled_plugin_action
                        .plugin
                        .ok_or_else(|| anyhow!("NewTiledPluginPane missing plugin"))?
                        .try_into()?,
                    pane_name: new_tiled_plugin_action.pane_name,
                    skip_cache: new_tiled_plugin_action.skip_cache,
                    cwd: new_tiled_plugin_action.cwd.map(PathBuf::from),
                    no_focus: new_tiled_plugin_action.no_focus,
                    tab_id: new_tiled_plugin_action.tab_id.map(|t| t as usize),
                })
            },
            ActionType::NewFloatingPluginPane(new_floating_plugin_action) => {
                Ok(crate::input::actions::Action::NewFloatingPluginPane {
                    plugin: new_floating_plugin_action
                        .plugin
                        .ok_or_else(|| anyhow!("NewFloatingPluginPane missing plugin"))?
                        .try_into()?,
                    pane_name: new_floating_plugin_action.pane_name,
                    skip_cache: new_floating_plugin_action.skip_cache,
                    cwd: new_floating_plugin_action.cwd.map(PathBuf::from),
                    coordinates: new_floating_plugin_action

View on GitHub (pinned to 98a0837077)

Solutions

  1. Set the `plugin` field (at minimum a _location: tag or file path) on NewTiledPluginPane before sending
  2. Regenerate protobuf stubs for the client from the server's zellij version
  3. Align CLI/plugin and server versions
  4. Validate required fields before dispatch and drop malformed actions with a log line

Example fix

// before
let a = ProtobufAction::default();
a.action_type = Some(ActionType::NewTiledPluginPane(NewTiledPluginPaneAction { ..Default::default() })); // plugin: None

// after
let a = ProtobufAction::default();
a.action_type = Some(ActionType::NewTiledPluginPane(NewTiledPluginPaneAction {
    plugin: Some(ProtobufPlugin { _location: Some(location), ..Default::default() }),
    ..Default::default()
}));
Defensive patterns

Strategy: validation

Validate before calling

if let ActionType::NewTiledPluginPane(a) = action.action_type.as_ref().unwrap() {
    if a.plugin.is_none() {
        anyhow::bail!("NewTiledPluginPane requires a plugin location");
    }
}

Type guard

fn new_tiled_plugin_action_is_valid(a: &NewTiledPluginPaneAction) -> bool {
    a.plugin.as_ref().is_some_and(|p| p._location.is_some())
}

Try / catch

match protobuf_action.try_into() {
    Ok(action) => dispatch(action),
    Err(e) if e.to_string().contains("NewTiledPluginPane missing plugin") => {
        log::warn!("dropping malformed NewTiledPluginPane action");
    },
    Err(e) => return Err(e.context("action conversion failed")),
}

Prevention

When it happens

Trigger: Sending Action { NewTiledPluginPane { ... } } over IPC with the plugin field unset — default-constructed messages from custom clients, stale generated stubs, or a truncated/malformed payload.

Common situations: Automation or plugin frameworks opening plugin panes programmatically without setting the plugin location; client/server built from different zellij versions with schema drift; tests emitting default actions.

Related errors


AI-assisted analysis of zellij-org/zellij@98a0837077 (2026-08-16). Data as JSON: /api/errors/cfcbfa658953ac87. Report an issue: GitHub.