You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wait-for command frequently causes 30-100s delays waiting for
patterns that never appear. Replace all references with wait-idle,
which is more reliable for waiting on output stabilization.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: agents/tmux-cli.ts
+5-39Lines changed: 5 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ const outputSchema = {
35
35
items: {
36
36
type: 'object'asconst,
37
37
properties: {
38
-
script: {type: 'string'asconst,description: 'Which helper command had the issue (e.g., "send", "capture", "wait-for")'},
38
+
script: {type: 'string'asconst,description: 'Which helper command had the issue (e.g., "send", "capture", "wait-idle")'},
39
39
issue: {type: 'string'asconst,description: 'What went wrong when using the helper script'},
40
40
errorOutput: {type: 'string'asconst,description: 'The actual error message or unexpected output'},
41
41
suggestedFix: {type: 'string'asconst,description: 'Suggested fix for the parent agent to implement'},
@@ -178,11 +178,6 @@ Captures show the **visible pane** by default. Add \`--full\` for the entire scr
178
178
### Waiting
179
179
180
180
\`\`\`bash
181
-
# Wait until a pattern appears in the visible pane (regex, default timeout: 30s)
182
-
$HELPER wait-for "$SESSION" "Your guess:"
183
-
$HELPER wait-for "$SESSION" "\\$" --timeout 10
184
-
$HELPER wait-for "$SESSION" "ready" --timeout 60
185
-
186
181
# Wait until output is stable for N seconds (max 120s)
187
182
$HELPER wait-idle "$SESSION" 3
188
183
\`\`\`
@@ -210,8 +205,7 @@ If the CLI appears hung, try \`$HELPER key "$SESSION" C-c\` to interrupt. If it'
210
205
- Use the provided tmux session as the single source of truth. Do not start a second session.
211
206
- **Capture discipline:** Aim for 3-8 captures per run. Capture at key milestones: startup, after important interactions, on errors, and final state. Do NOT capture after every single input.
212
207
- **Use \`--full\` on the final capture** to get complete scrollback history. Regular captures only show the visible pane (~30 lines), keeping them small and focused.
213
-
- **Use \`wait-for\` before sending input** when you need to wait for a prompt or specific output to appear. This is more reliable than guessing wait times.
214
-
- **Wait guidance:** Most CLIs need 1-2 seconds to process input. Use \`--wait-idle 2\` on send or \`--wait 2\` on capture. For streaming CLIs, use \`--wait-idle 3\` or higher.
208
+
- **Wait guidance:** Most CLIs need 1-2 seconds to process input. Use \`--wait-idle 2\` on send or \`--wait 2\` on capture. For streaming CLIs, use \`--wait-idle 3\` or higher. Use \`wait-idle\` to wait for output to stabilize before sending more input.
215
209
- Use \`--label\` on captures to make filenames descriptive.
216
210
- If the CLI already shows enough evidence in the current viewport, do not keep recapturing.`,
217
211
@@ -222,8 +216,8 @@ If the CLI appears hung, try \`$HELPER key "$SESSION" C-c\` to interrupt. If it'
222
216
A tmux session has been started for you. A setup message will announce the session name, helper script path, and the initial terminal output. Your command has already been sent to the session.
223
217
224
218
1. **Check the initial output** provided in the setup message. If you see errors like "command not found" or "No such file", report failure immediately.
225
-
2. **Interact with the CLI** using the helper commands documented in the system prompt (send, key, capture, wait-for, etc.).
226
-
3. **Capture output** at key milestones. Use \`wait-for\` to wait for expected prompts before sending input.
219
+
2. **Interact with the CLI** using the helper commands documented in the system prompt (send, key, capture, wait-idle, etc.).
220
+
3. **Capture output** at key milestones. Use \`wait-idle\` to wait for output to stabilize before sending more input.
227
221
4. **Final capture** with full scrollback before stopping: \`$HELPER capture "$SESSION" --full --label "final"\`
228
222
5. **Stop the session**: \`$HELPER stop "$SESSION"\`
0 commit comments