can1357/oh-my-pi · error · Error
timed out: {command}
Error message
timed out: {command} What it means
Error::CliTimeout is raised when a CLI-backed operation exceeded its deadline and was killed. The error includes the rendered command line but not output, since the process was terminated mid-flight.
Source
Thrown at crates/pi-vcs/src/error.rs:77
message: String,
},
/// A CLI-backed operation (push/fetch/clone, reftable fallback) exited
/// non-zero. Carries the captured streams for user-facing error surfaces.
#[error("{}", crate::error::cli_message(command, *exit_code, stdout, stderr))]
Cli {
/// Rendered command line (`git push --no-follow-tags …`).
command: String,
/// Process exit code.
exit_code: i32,
/// Captured stdout (may be truncated).
stdout: String,
/// Captured stderr (may be truncated).
stderr: String,
},
/// A CLI-backed operation exceeded its deadline and was killed.
#[error("timed out: {command}")]
CliTimeout {
/// Rendered command line.
command: String,
},
/// Filesystem error outside any more specific failure mode.
#[error(transparent)]
Io(#[from] std::io::Error),
/// An underlying gix / jj-lib failure that has no dedicated variant.
#[error("{context}: {message}")]
Backend {
/// Operation being performed (`"git status"`, `"jj snapshot"`, …).
context: &'static str,
/// Backend error rendered as text (full source chain).
message: String,
},
View on GitHub (pinned to 9690622007)
Solutions
- Increase the operation deadline/timeout configured on the Vcs client if the workload is legitimately large.
- Retry the operation — fetch/push are resumable to a degree and transient slowness often clears.
- For clones/fetches, use a shallow or partial clone (`--depth 1`, `--filter=blob:none`) to cut transfer time.
- Run the command once interactively to clear blocking prompts (host-key/credential) that stall non-interactive runs.
Example fix
// before
let vcs = Vcs::open(&dir)?; // default 30s deadline
// after
let vcs = Vcs::open(&dir)?.with_cli_timeout(Duration::from_secs(300));
match vcs.fetch("origin") {
Err(Error::CliTimeout { command }) => eprintln!("retrying, {command} exceeded deadline"),
other => other?,
} Defensive patterns
Strategy: retry
Type guard
fn is_cli_timeout(err: &pi_vcs::Error) -> bool {
matches!(err, pi_vcs::Error::CliTimeout { .. })
} Try / catch
for attempt in 1..=3 {
match repo.fetch("origin") {
Err(pi_vcs::Error::CliTimeout { command }) => {
log::warn!("{command} timed out (attempt {attempt})");
Bun_sleep(std::time::Duration::from_secs(2u64.pow(attempt)));
}
other => { other?; break; }
}
} Prevention
- Size CLI deadlines to the workload — large fetches/clones need minutes, not seconds.
- Use shallow/partial clones (`--depth`, `--filter=blob:none`) for big repositories.
- Run blocking prompts (SSH host-key, credential) once interactively so non-interactive runs never stall.
- Add exponential-backoff retry around fetch/push; transient network slowness is the usual trigger.
When it happens
Trigger: Long-running git/jj commands that exceed the library's configured deadline: pushing/fetching a large repo over a slow link, cloning a huge monorepo, a hung credential prompt over SSH with no TTY, or an index-heavy operation on a cold cache.
Common situations: Slow or flaky network to the remote, first clone of a multi-GB repository, SSH host-key prompt blocking stdin, git-lfs smudge filters downloading large objects, or an unrealistically short timeout configured by the embedding application.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- cli_message(command, exit_code, stdout, stderr)
- git timed out after {effective_timeout:.0f}s: {' '.join(_red
- git {fn.__name__} timed out
- not a repository: {path}
- reference not found: {name}
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/1d520aa5eb7562f5.
Report an issue: GitHub.