zellij-org/zellij · error · anyhow::Error
Tab index not found
Error message
Tab index {:?} not found What it means
Error "Tab index {:?} not found" thrown in zellij-org/zellij.
Solutions
- Ensure at least one tab exists before attaching or moving clients.
- Verify the tab index/name is valid with `zellij action query-tab-names`.
When it happens
Trigger: Occurs at zellij-server/src/screen.rs:2048 when the operation fails: "Tab index {:?} not found". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.
Common situations: Race between tab close and a client attach/move action, or a stale tab index.
AI-assisted analysis of zellij-org/zellij@474ea0cef6 (2026-08-19).
Data as JSON: /api/errors/1c95c87c4db1be5e.
Report an issue: GitHub.
Appendix: source
Thrown at zellij-server/src/screen.rs:2135
.with_context(err_context)?;
match (
should_change_pane_focus,
self.get_indexed_tab_mut(new_tab_index),
) {
(Some(direction), Some(new_tab)) => {
new_tab.focus_pane_on_edge(direction, client_id);
},
_ => {},
}
self.update_client_tab_focus(client_id, new_tab_index);
}
if let Some(current_tab) = self.get_indexed_tab_mut(current_tab_index) {
if current_tab.has_no_connected_clients() {
current_tab.visible(false).with_context(err_context)?;
}
} else {
Err::<(), _>(anyhow!("Tab index {:?} not found", current_tab_index))
.with_context(err_context)
.non_fatal();
}
// Clear tab bell notification for the newly active tab
if let Some(new_tab) = self.tabs.get_mut(&new_tab_index) {
let tab_id = new_tab.id;
new_tab.clear_tab_bell_notification();
let _ = self
.bus
.senders
.send_to_background_jobs(BackgroundJob::StopFlashTabBell(tab_id));
}
self.recompute_tab_size(current_tab_index)
.with_context(err_context)?;
self.recompute_tab_size(new_tab_index)
.with_context(err_context)?;View on GitHub (pinned to 474ea0cef6)