zellij-org/zellij · error

failed to create async reader

Error message

failed to create async reader: {}

What it means

Error "failed to create async reader: {}" thrown in zellij-org/zellij.

Solutions

  1. Check system resource limits (open files, processes) and the OS error attached to the failure.
  2. Retry the operation; if persistent, report the OS error with a zellij issue.

When it happens

Trigger: Occurs at zellij-server/src/os_input_output_unix.rs:345 when the operation fails: "failed to create async reader: {}". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.

Common situations: Typically resource exhaustion, invalid fd state, or platform-specific pty limitations.


AI-assisted analysis of zellij-org/zellij@5cb5df5cce (2026-08-19). Data as JSON: /api/errors/7755da233eaa8fa9. Report an issue: GitHub.

Appendix: source

Thrown at zellij-server/src/os_input_output_unix.rs:345

        let orig_termios = self
            .orig_termios
            .lock()
            .to_anyhow()
            .context("failed to lock orig_termios")?;
        let (pid_primary, child_fd) = handle_terminal(
            cmd,
            failover_cmd,
            orig_termios.clone(),
            quit_cb,
            terminal_id,
        )?;
        self.terminal_id_to_raw_fd
            .lock()
            .to_anyhow()?
            .insert(terminal_id, Some(pid_primary));
        let async_reader = Box::new(
            RawFdAsyncReader::new(pid_primary)
                .map_err(|e| anyhow::anyhow!("failed to create async reader: {}", e))?,
        ) as Box<dyn AsyncReader>;
        Ok((async_reader, child_fd))
    }

    pub fn set_terminal_size(
        &self,
        terminal_id: u32,
        cols: u16,
        rows: u16,
        width_in_pixels: Option<u16>,
        height_in_pixels: Option<u16>,
    ) -> Result<()> {
        let err_context = || {
            format!(
                "failed to set terminal id {} to size ({}, {})",
                terminal_id, rows, cols
            )
        };

View on GitHub (pinned to 5cb5df5cce)