Hmbown/CodeWhale · error

running tmux lane ` ` lacks pinned socket/session metadata…

Error message

running tmux lane `{}` lacks pinned socket/session metadata; refusing unsafe reconciliation

What it means

`reconcile` compares a lane record's pinned tmux session against reality to decide whether a Running lane is actually alive. When the record claims Running but lacks both pinned tmux_socket and tmux_session, reconcile cannot safely probe the session — guessing would either leak a live session or falsely mark a lane dead — so it bails instead of making an unsafe decision.

Solutions

  1. Repair the record: fill in the correct tmux_socket/tmux_session for the live session, or mark the lane stopped if the session is gone.
  2. Run the registry schema migration if upgrading from a version without pinned tmux metadata.
  3. If no tmux session exists, verify with `tmux ls` / `tmux -S <socket> has-session` and then clean up the stale record so reconcile skips it.
  4. Avoid hand-editing registry records; let start/stop/reconcile maintain the pinned metadata.

Example fix

// before
{ "id": "lane-42", "status": "Running", "tmux_socket": null, "tmux_session": null }

// after (session verified live on /tmp/lane.sock)
{ "id": "lane-42", "status": "Running", "tmux_socket": "/tmp/lane.sock", "tmux_session": "lane-42" }
Defensive patterns

Strategy: validation

Validate before calling

fn reconcilable(rec: &LaneRecord) -> bool {
    rec.status != LaneStatus::Running
        || (rec.tmux_socket.is_some() && rec.tmux_session.is_some())
}

Type guard

fn has_pinned_tmux(rec: &LaneRecord) -> bool {
    rec.tmux_socket.is_some() && rec.tmux_session.is_some()
}

Prevention

When it happens

Trigger: Running `reconcile` over a registry containing a Running tmux lane record whose tmux_socket/tmux_session fields are missing or null — records from a pre-pinning schema version, a crashed start that persisted Running before the pins, or corrupted/hand-edited registry files.

Common situations: Version-upgraded workspaces where old lane records lack the pin fields; a crash between the Running transition and metadata persistence; registry JSON edited manually or truncated by a failed write.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/0aff0d2c5a7808ec. Report an issue: GitHub.

Appendix: source

Thrown at crates/lane/src/runtime.rs:905

        let (lane_status, exit_code, reason) = if let Some(receipt) = receipt {
            (
                if receipt.exit_code == 0 {
                    LaneStatus::Completed
                } else {
                    LaneStatus::Failed
                },
                Some(receipt.exit_code),
                "process_exit_receipt",
            )
        } else {
            if std::env::var_os("CODEWHALE_LANE_TMUX_DRY_RUN").is_some() {
                return Ok(false);
            }
            let (Some(socket), Some(session)) = (
                record.tmux_socket.as_deref(),
                record.tmux_session.as_deref(),
            ) else {
                bail!(
                    "running tmux lane `{}` lacks pinned socket/session metadata; refusing unsafe reconciliation",
                    record.id
                );
            };
            match tmux_session_state(socket, session)? {
                TmuxSessionState::Present => return Ok(false),
                TmuxSessionState::Absent => {}
            }
            (
                LaneStatus::Failed,
                None,
                "tmux_session_missing_without_exit_receipt",
            )
        };

        if registry.mark_terminal_if_active(record, lane_status)? {
            append_log_event(
                &record.log_path,

View on GitHub (pinned to 73e0f67d83)