{"record":{"id":"1d520aa5eb7562f5","repo":"can1357/oh-my-pi","slug":"timed-out-command","errorCode":null,"errorMessage":"timed out: {command}","messagePattern":"timed out: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/pi-vcs/src/error.rs","lineNumber":77,"sourceCode":"\t\tmessage: String,\n\t},\n\n\t/// A CLI-backed operation (push/fetch/clone, reftable fallback) exited\n\t/// non-zero. Carries the captured streams for user-facing error surfaces.\n\t#[error(\"{}\", crate::error::cli_message(command, *exit_code, stdout, stderr))]\n\tCli {\n\t\t/// Rendered command line (`git push --no-follow-tags …`).\n\t\tcommand:   String,\n\t\t/// Process exit code.\n\t\texit_code: i32,\n\t\t/// Captured stdout (may be truncated).\n\t\tstdout:    String,\n\t\t/// Captured stderr (may be truncated).\n\t\tstderr:    String,\n\t},\n\n\t/// A CLI-backed operation exceeded its deadline and was killed.\n\t#[error(\"timed out: {command}\")]\n\tCliTimeout {\n\t\t/// Rendered command line.\n\t\tcommand: String,\n\t},\n\n\t/// Filesystem error outside any more specific failure mode.\n\t#[error(transparent)]\n\tIo(#[from] std::io::Error),\n\n\t/// An underlying gix / jj-lib failure that has no dedicated variant.\n\t#[error(\"{context}: {message}\")]\n\tBackend {\n\t\t/// Operation being performed (`\"git status\"`, `\"jj snapshot\"`, …).\n\t\tcontext: &'static str,\n\t\t/// Backend error rendered as text (full source chain).\n\t\tmessage: String,\n\t},\n","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/crates/pi-vcs/src/error.rs#L59-L95","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nlet vcs = Vcs::open(&dir)?; // default 30s deadline\n// after\nlet vcs = Vcs::open(&dir)?.with_cli_timeout(Duration::from_secs(300));\nmatch vcs.fetch(\"origin\") {\n    Err(Error::CliTimeout { command }) => eprintln!(\"retrying, {command} exceeded deadline\"),\n    other => other?,\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":"fn is_cli_timeout(err: &pi_vcs::Error) -> bool {\n    matches!(err, pi_vcs::Error::CliTimeout { .. })\n}","tryCatchPattern":"for attempt in 1..=3 {\n    match repo.fetch(\"origin\") {\n        Err(pi_vcs::Error::CliTimeout { command }) => {\n            log::warn!(\"{command} timed out (attempt {attempt})\");\n            Bun_sleep(std::time::Duration::from_secs(2u64.pow(attempt)));\n        }\n        other => { other?; break; }\n    }\n}","preventionTips":["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."],"tags":["vcs","git","timeout","cli","network"],"backgroundTag":"process-timeout","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}