AprilNEA/OpenLogi · error
the running Agent disconnected while providing its device…
Error message
the running Agent disconnected while providing its device snapshot
What it means
The inner-error sibling of [78]: the `snapshot` tarpc call returned `Err`, i.e. the agent dropped the connection or the request failed server-side while producing the device snapshot. No capture proceeds and no profile is written.
Solutions
- Retry once the agent is stable and confirmed running
- Restart the agent and check its logs for an enumeration panic/error
- Align CLI and agent versions (wire-format compatibility, `PROTOCOL_VERSION`)
- Re-run capture avoiding concurrent agent shutdown (e.g. GUI updates, autostart restarts)
Defensive patterns
Strategy: retry
Validate before calling
// verify the agent survives a snapshot probe
let pid = agent_pid();
let _ = snapshot_probe().await;
if agent_pid() != pid {
eprintln!("agent died during snapshot; inspect its logs before capture");
} Try / catch
match capture_connected_profile(&conn, ...).await {
Err(e) if e.to_string().contains("disconnected while providing its device snapshot") => {
eprintln!("agent dropped mid-snapshot; check logs, align versions, retry");
}
other => other,
} Prevention
- Keep CLI and agent wire-format compatible (PROTOCOL_VERSION, wire_format tests)
- Fix agent-side enumeration panics surfaced in logs before re-running capture
- Avoid terminating the GUI/agent while a record session is active
When it happens
Trigger: The agent's connection breaks or it returns an error while servicing `snapshot()` — agent crash mid-enumeration, serialization failure of the snapshot payload, or the agent shutting down during capture.
Common situations: Agent crash-looping; a device error inside the agent's enumeration causing the tarpc task to abort; killing/quitting the GUI/agent during record; version skew making the snapshot payload fail to serialize/deserialize.
Related errors
- the running Agent disconnected before semantic capture…
- the running Agent timed out while providing its device…
- the running Agent speaks protocol v
- could not reach the running OpenLogi Agent; start the Agent…
- the running OpenLogi Agent did not complete a healthy IPC…
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/3982227cf0efc1f5.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/fixture/record_profile.rs:151
}
tokio::time::timeout(
DECLARE_TIMEOUT,
connection
.client
.declare_client(context::current(), ClientKind::Cli),
)
.await
.map_err(|_| anyhow!("the running Agent timed out before semantic capture could begin"))?
.map_err(|_| anyhow!("the running Agent disconnected before semantic capture could begin"))?;
let snapshot = tokio::time::timeout(
SNAPSHOT_TIMEOUT,
connection.client.snapshot(context::current()),
)
.await
.map_err(|_| anyhow!("the running Agent timed out while providing its device snapshot"))?
.map_err(|_| anyhow!("the running Agent disconnected while providing its device snapshot"))?;
let captured = capture_profile(&connection.client, snapshot, selector, id, name).await?;
captured
.profile
.validate()
.context("captured semantic profile failed version-1 validation; no profile was written")?;
Ok(captured)
}
fn validate_metadata(args: &RecordProfileArgs) -> Result<()> {
if args.id.trim().is_empty() {
bail!("--id must be a nonempty synthetic identifier");
}
if args.name.trim().is_empty() {
bail!("--name must be a nonempty synthetic profile name");
}
Ok(())
}View on GitHub (pinned to e846e6f4b4)