Skip to content

fix(skill): run plugins like hooks: timeout, kill on drop, null stdin, raw cmd args - #497

Merged
mrnasil merged 2 commits into
mainfrom
fix/skill-plugin-runner
Nov 25, 2026
Merged

mrnasil merged 2 commits into
mainfrom
fix/skill-plugin-runner

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 25, 2026

Copy link
Copy Markdown
Member

Plugin::execute was an older copy of the hook runner and was missing four of its fixes.

Before Now
No timeout: a hung plugin held the turn until Esc Stopped after 300 s, returning an error result
No kill_on_drop: on Esc the child kept running Killed when the call is dropped
stdin inherited from the terminal: a plugin that reads stdin waited forever or took keystrokes Empty stdin
Windows .arg(command) escaping that cmd does not understand: python "C:\Program Files\x.py" broke raw_arg, as in the hook runner

Tests: a hung plugin times out (with a test-sized timeout), and a plugin that reads stdin and echoes a quoted string finishes with the quotes intact. On Linux (WSL) all 43 skill tests pass and plugin.rs has 100% line coverage.

execute_failure_prefers_stderr_then_stdout and execute_uses_working_dir_and_workspace_env use sh syntax and already fail on Windows on main; this PR does not change that.

🤖 Generated with Claude Code

…, raw cmd args

Plugin::execute was an older copy of the hook runner and missed its
fixes:

- no timeout: a hung plugin held the turn until Esc. Calls now stop
  after 300 s with an error result;
- no kill_on_drop: on Esc the child kept running. It is killed now;
- stdin inherited the terminal: a plugin that reads stdin waited for
  ever or took keystrokes. It gets an empty stdin;
- on Windows `.arg(command)` escaped quotes the way cmd does not
  understand, so `python "C:\Program Files\x.py"` broke. It uses
  raw_arg like the hook runner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mrnasil
mrnasil enabled auto-merge (squash) November 25, 2026 15:35
@mrnasil
mrnasil merged commit cac3706 into main Nov 25, 2026
7 checks passed
@mrnasil
mrnasil deleted the fix/skill-plugin-runner branch November 25, 2026 22:49
@mrnasil mrnasil mentioned this pull request Nov 26, 2026
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