Skip to content

feat: add --debounce option to wait, update docs#5

Merged
onesuper merged 1 commit into
mainfrom
feature/wait-debounce
Apr 9, 2026
Merged

feat: add --debounce option to wait, update docs#5
onesuper merged 1 commit into
mainfrom
feature/wait-debounce

Conversation

@onesuper

@onesuper onesuper commented Apr 9, 2026

Copy link
Copy Markdown
Owner

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.

  • timeout (existing) — the hard deadline; wait returns regardless when this expires
  • --debounce (new, default 100ms) — the stability window; increase for slow programs

tui-use wait --debounce 300 # wait until 300ms of silence (slow programs)
tui-use wait 5000 --debounce 500 # 5s deadline, 500ms stability window

Changes

  • session.wait() accepts optional debounceMs parameter (default 100)
  • WaitRequest protocol type adds debounce_ms?: number
  • CLI wait command adds --debounce option
  • README: rewrote How It Works to focus on the wait model; clarified Why not tmux
  • SKILL.md: simplified structure, fixed Core Workflow, added --text semantic signal guidance
  • Plugin version bumped to 0.4.0

Tests

  • uses 100ms debounce by default
  • respects custom debounceMs
  • custom debounceMs resolves after specified idle time

- 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>
@onesuper onesuper merged commit f9102dd into main Apr 9, 2026
@onesuper onesuper deleted the feature/wait-debounce branch April 9, 2026 04:01
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