feat: bang (!) commands — shell exec via spawned task with timeout - #404
Open
alecuba16 wants to merge 1 commit into
Open
feat: bang (!) commands — shell exec via spawned task with timeout#404alecuba16 wants to merge 1 commit into
alecuba16 wants to merge 1 commit into
Conversation
Execute shell commands directly from the prompt with ! prefix. Disabled by default (opt-in via bangCommands.enabled in settings). - Spawned subprocess with 60s timeout (not synchronous on event loop) - Output capped at 100KB to prevent OOM - Cross-platform: sh on Unix, cmd on Windows (no hardcoded bash) - Blocked in plan mode - Result displayed as a notification when showInTranscript is true Addresses PR Kuberwastaken#388 review point 3: bang exec moved from synchronous bash -c .output() to spawned task with timeout and output cap.
alecuba16
force-pushed
the
pr388-bang
branch
from
September 3, 2026 08:57
63768dc to
383a38b
Compare
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split from #388 (bang + yolo + poke). This PR contains only the bang commands feature.
What it does: Execute shell commands directly from the prompt with
!prefix. Disabled by default (opt-in viabangCommands.enabledin settings).Security improvements over the original #388 implementation:
tokio::task::spawn_blockingwrapped intokio::time::timeout(60s). The TUI event loop never blocks.sh -con Unix,cmd /Con Windows. No hardcodedbash.!is intercepted only at the prompt submission path inrun_interactive(run.rs), not in multiple places.Config:
{ "config": { "bangCommands": { "enabled": true, "showInTranscript": true } } }bangCommands.enabledis global-only in the Settings merge (project settings cannot enable it when global is disabled).5 files, +175 lines, 0 deletions. No CRLF/LF churn.