Skip to content

fix(cli): route spawn failures and hangs into the err convention - #26

Merged
abosnjakovic merged 2 commits into
mainfrom
fix/cli-spawn-errors
Aug 13, 2026
Merged

fix(cli): route spawn failures and hangs into the err convention#26
abosnjakovic merged 2 commits into
mainfrom
fix/cli-spawn-errors

Conversation

@abosnjakovic

Copy link
Copy Markdown
Owner

Missing/misconfigured but threw E5108 stacktraces from every :Butler* command (vim.system throws on ENOENT, bypassing the callback err convention). Now pcall-wrapped with a friendly cli.unusable message; all blocking wait() calls get timeouts (probe 5s, run_sync 30s, raw git 10s) so a hung subprocess cannot freeze the editor.

Found via a strap native-DAP discovery session against a live nvim. Includes .strap harness wiring.

🤖 Generated with Claude Code

abosnjakovic and others added 2 commits August 13, 2026 16:09
vim.system throws on a missing or non-executable cmd instead of returning
a code, so a user without but (or with cmd misconfigured) got an E5108
stacktrace from every :Butler* command rather than the designed
callback -> vim.notify path. pcall the probe and both spawn sites and
surface cli.unusable (missing binary, probe timeout) or the existing
version message.

Cap every blocking wait(): probe 5s, run_sync 30s (SIGKILL + code 124
reported as a timeout error), raw git calls in commit_diff/timeline 10s —
a hung subprocess must not freeze the editor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@abosnjakovic
abosnjakovic merged commit 78bb8d1 into main Aug 13, 2026
6 checks passed
@abosnjakovic
abosnjakovic deleted the fix/cli-spawn-errors branch August 13, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant