{"record":{"id":"1dd98c6a2a0c12e9","repo":"Hmbown/CodeWhale","slug":"tmux-attach-unavailable","errorCode":null,"errorMessage":"tmux attach unavailable","messagePattern":"tmux attach unavailable","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":980,"sourceCode":"                return Ok(());\n            }\n            if let Some(session) = lane.tmux_session.as_deref() {\n                let socket = lane\n                    .tmux_socket\n                    .as_deref()\n                    .context(\"tmux lane is missing its pinned server socket\")?;\n                let status = Command::new(\"tmux\")\n                    .arg(\"-S\")\n                    .arg(socket)\n                    .args([\"attach\", \"-t\", session])\n                    .status();\n                match status {\n                    Ok(s) if s.success() => Ok(()),\n                    Ok(s) => bail!(\"tmux attach failed ({s}); command was: {attach}\"),\n                    Err(err) => {\n                        eprintln!(\"could not exec tmux: {err}\");\n                        println!(\"{attach}\");\n                        bail!(\"tmux attach unavailable\");\n                    }\n                }\n            } else {\n                println!(\"{attach}\");\n                Ok(())\n            }\n        }\n        LaneCommand::Logs {\n            lane_id,\n            follow,\n            tail,\n        } => {\n            let reg = LaneRegistry::open_default()?;\n            let lane = reg.load(&lane_id)?;\n            let path = lane.log_path;\n            if !path.exists() {\n                bail!(\"log file missing: {}\", path.display());\n            }","sourceCodeStart":962,"sourceCodeEnd":998,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L962-L998","documentation":"When the tmux attach backend could not even exec the `tmux` binary (`status()` returned `Err(err)`), the code prints the exec error to stderr, helpfully prints the attach command to stdout so the user can run it elsewhere, and fails with 'tmux attach unavailable'. This signals tmux is not installed or not executable in the current environment.","triggerScenarios":"`tmux` binary missing from PATH, not executable, or `Command::status` fails for any OS reason (e.g. PATH stripped in the execution environment, broken installation).","commonSituations":"Minimal containers/CI images without tmux installed; tmux installed under a nonstandard path not in PATH; running codewhale via a service with a restricted PATH.","solutions":["Install tmux (e.g. `apt install tmux`, `brew install tmux`) and retry the attach.","Use the attach command printed to stdout to attach manually from a shell where tmux IS available.","Fix PATH in the environment running codewhale so `tmux` is resolvable."],"exampleFix":"// before\n$ codewhale lane attach lane-1\nerror: tmux attach unavailable\n// after\n$ sudo apt install tmux\n$ codewhale lane attach lane-1","handlingStrategy":"fallback","validationCode":"const which = spawnSync('which', ['tmux']);\nif (which.status !== 0) throw new Error('tmux is not installed; install it or use the printed attach command manually');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provision tmux in images/containers that run codewhale lanes.","Check `which tmux` in setup scripts before lane attach.","Capture the attach command printed to stdout as a fallback."],"tags":["tmux","missing-binary","environment","lane"],"backgroundTag":"missing-dependency","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}