feat: add --debounce option to wait, update docs#5
Merged
Conversation
- Add debounce_ms parameter to session.wait(), WaitRequest, and CLI - tui-use wait --debounce <ms> controls idle window before resolving (default: 100ms) - Rewrite README: How It Works focused on wait model, Why not tmux clarified - Add Smart Wait to Features, explain debounce vs timeout distinction - Update SKILL.md: fix Core Workflow, add --text semantic signal guidance, simplify structure - Bump plugin version to 0.4.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Problem
wait resolved after a fixed 100ms idle window with no way to tune it. Programs with unpredictable timing — pdb stepping through slow code, large computations, TUI apps with complex redraws — required agents to add sleep calls as a
workaround, which is exactly what tui-use is supposed to eliminate.
Solution
Added a --debounce option to wait. The debounce window controls how long the screen must be stable before wait resolves. It resets on every change, so a program that keeps outputting keeps wait blocked until the output truly
settles.
tui-use wait --debounce 300 # wait until 300ms of silence (slow programs)
tui-use wait 5000 --debounce 500 # 5s deadline, 500ms stability window
Changes
Tests