Hmbown/CodeWhale · error · anyhow::Error
inline lane `{}` cannot be stopped safely from another proce
Error message
inline lane `{}` cannot be stopped safely from another process What it means
InlineRuntime::stop refuses to stop a Running inline lane from another process. Inline lanes are child processes of the process that started them; only that parent can identify and reap them safely, so a cross-process stop (different PID, possibly different machine session) bails instead of risking a kill of the wrong process or an unreaped zombie. The guard runs inside the fenced Stopped transition, so no state changes on refusal.
Source
Thrown at crates/lane/src/runtime.rs:1064
}
fn attach_command(&self, _record: &LaneRecord) -> Option<String> {
None
}
fn stop(
&self,
registry: &LaneRegistry,
record: &mut LaneRecord,
fence: Option<u64>,
) -> Result<TerminalTransition> {
let transition = registry.mark_terminal_if_active_fenced(
record,
LaneStatus::Stopped,
fence,
|current| {
if current.status == LaneStatus::Running {
bail!(
"inline lane `{}` cannot be stopped safely from another process",
current.id
);
}
Ok(())
},
)?;
if transition.transitioned() {
self.cleanup_worktree(record)?;
}
Ok(transition)
}
}
/// Placeholder for remote VM / CI backends (surface only in Phase 1).
#[derive(Debug)]
struct StubRuntime {
kind: RuntimeBackendKind,View on GitHub (pinned to 0c42157ee5)
Solutions
- Stop the lane from the owning process (the session/TUI that started it)
- If the owner is gone, terminate the child out-of-band (kill by PID) and let reconciliation move the lane to a terminal state
- Use the tmux backend when lanes must be manageable from independent processes
Defensive patterns
Strategy: validation
Validate before calling
fn lane_stoppable_from_this_process(record: &LaneRecord) -> bool {
!(record.runtime_kind == RuntimeBackendKind::Inline && record.status == LaneStatus::Running)
}
if !lane_stoppable_from_this_process(&record) {
// route the stop to the owning process, or choose the tmux backend upfront
} Type guard
fn is_inline_running(record: &LaneRecord) -> bool {
record.runtime_kind == RuntimeBackendKind::Inline && record.status == LaneStatus::Running
} Prevention
- Choose the tmux backend when lanes must be managed by separate processes (CLI, daemon)
- Keep inline lanes under the lifetime of the process that started them and stop them there
- For orphaned inline lanes, kill the child by PID and let reconciliation finalize status
When it happens
Trigger: Calling stop on a Running inline lane from a process other than the one that called start — e.g. a second CLI invocation, a daemon restarted after a crash, or a monitoring tool trying to clean up lanes.
Common situations: Operator runs a cleanup command from another terminal while the TUI that owns the inline lane is still alive; a supervisor process restarted and trying to stop lanes spawned by its predecessor; scripts assuming all lane kinds are stoppable from anywhere (true for tmux, not inline).
Related errors
- running tmux lane `{}` has incomplete pinned session metadat
- inline runtime requires a non-empty command
- lane `{}` was stopped before inline start completed
- project workspace path cannot be empty
- project workspace path cannot contain '..' components
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/a4e567a69bdac2e8.
Report an issue: GitHub.