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
- 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.
- Run the registry schema migration if upgrading from a version without pinned tmux metadata.
- 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.
- 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
- Run schema migrations after version upgrades so all Running records carry pins.
- Back up and validate registry JSON; never edit pins by hand.
- Reconcile only records that pass the pinned-metadata guard.
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
- running tmux lane ` ` has incomplete pinned session…
- Cargo metadata dependencies for
- Facts must be scalar metadata, not content objects.
- Failed to run tmux load-buffer -w
- fleet task ' ' coordination contracts must be one non-empty…
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)