Compare commits

...

3 Commits

Author SHA1 Message Date
Peter Steinberger
4223ad02ca docs: note tmux send-keys TUI guidance (#7737) (thanks @Wangnov) 2026-02-03 22:03:29 -08:00
wangnov
de0568d213 docs(skills): soften TUI send-keys wording 2026-02-03 21:59:57 -08:00
wangnov
9703bd79dc docs(skills): split tmux send-keys for TUI 2026-02-03 21:59:57 -08:00
2 changed files with 13 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ Docs: https://docs.openclaw.ai
### Changes
- Onboarding: add Moonshot (.cn) auth choice and keep the China base URL when preserving defaults. (#7180) Thanks @waynelwz.
- Docs: clarify tmux send-keys for TUI by splitting text and Enter. (#7737) Thanks @Wangnov.
### Fixes

View File

@@ -50,6 +50,15 @@ To monitor:
- Prefer literal sends: `tmux -S "$SOCKET" send-keys -t target -l -- "$cmd"`.
- Control keys: `tmux -S "$SOCKET" send-keys -t target C-c`.
- For interactive TUI apps like Claude Code/Codex, this guidance covers **how to send commands**.
Do **not** append `Enter` in the same `send-keys`. These apps may treat a fast text+Enter
sequence as paste/multi-line input and not submit; this is timing-dependent. Send text and
`Enter` as separate commands with a small delay (tune per environment; increase if needed,
or use `sleep 1` if sub-second sleeps aren't supported):
```bash
tmux -S "$SOCKET" send-keys -t target -l -- "$cmd" && sleep 0.1 && tmux -S "$SOCKET" send-keys -t target Enter
```
## Watching output
@@ -82,6 +91,9 @@ done
tmux -S "$SOCKET" send-keys -t agent-1 "cd /tmp/project1 && codex --yolo 'Fix bug X'" Enter
tmux -S "$SOCKET" send-keys -t agent-2 "cd /tmp/project2 && codex --yolo 'Fix bug Y'" Enter
# When sending prompts to Claude Code/Codex TUI, split text + Enter with a delay
tmux -S "$SOCKET" send-keys -t agent-1 -l -- "Please make a small edit to README.md." && sleep 0.1 && tmux -S "$SOCKET" send-keys -t agent-1 Enter
# Poll for completion (check if prompt returned)
for sess in agent-1 agent-2; do
if tmux -S "$SOCKET" capture-pane -p -t "$sess" -S -3 | grep -q ""; then