Add commands, fix send-to-exited, improve docs#70
Merged
Conversation
Adds `blit wait ID --timeout N` to block until a PTY exits, with optional `--pattern REGEX` to match against new output. Fixes silent no-op when sending to exited sessions. Documents restart scrollback behavior, SSH tunneling mechanism, and history size warnings in SKILLS.md. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
|
When using --pattern on a PTY that already exited, the server sends one initial S2C_UPDATE but no subsequent updates or S2C_EXITED. After processing the update without a match, check conn.exited to return immediately instead of blocking until timeout. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
Allows `blit start --cols 200 --wait --timeout 60 make -j8` to start a PTY and block until it exits in one command. Opens a second connection to run the wait logic after the PTY is created. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
The README agent subcommands section was missing the new wait command, restart, and the start --wait shorthand. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
pcarrier
commented
Mar 31, 2026
blit wait command, fix send-to-exited, improve docsAdded wait subcommand synopsis and description, start --wait --timeout flags, send-to-exited error behavior, and restart scrollback note. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
jsegaran
approved these changes
Mar 31, 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.
Summary
blit wait ID --timeout Ncommand that blocks until a PTY exits, returning its exit code (124 on timeout, matching GNUtimeoutconvention)--pattern REGEXflag towaitthat matches against new output produced after the wait begins (avoids stale matches from old scrollback)--wait --timeout Nflags toblit startfor inline blocking (blit start --cols 200 --wait --timeout 60 make -j8)blit sendsilently dropping input to exited sessions — now returns an errorwait --patternhanging on already-exited PTY when pattern doesn't match--sshtunneling mechanism (SSH stdin/stdout relay to remote Unix socket via nc/socat, with connection multiplexing)historysize warning — emphasize always using--from-end 0 --limit Nblit waitexamplesMotivation
Every agent using blit reinvents the same polling loop to wait for command completion, and most get the sleep interval or retry count wrong.
blit waitcollapses 4-5 lines of bash into one.start --waitfurther reduces the most common pattern to a single command. The send-to-exited bug causes silent confusion. The doc gaps around restart, SSH, and history size were identified in external feedback.Testing
10 new tests added to the existing
MockServer-based test infrastructure:test_send_to_exited_sessionsendreturns error for exited PTYtest_wait_already_exitedtest_wait_exits_laterS2C_EXITEDand returns exit codetest_wait_timeouttest_wait_not_foundtest_wait_signal_exittest_wait_pattern_matchtest_wait_pattern_exits_before_matchtest_wait_pattern_already_exited_no_matchtest_wait_invalid_patternAll 57 tests pass.
cargo buildclean.Tag
@indentto continue the conversation here.