fix(dispatcher): send a lone Enter after the task paste to submit it
Multi-line task bodies arrived in Claude Code as "[Pasted text #N +M lines]" and sat in the input buffer forever — the trailing Enter that SendKeys appends to the paste is consumed as a newline inside the paste, not as a submit. Observed live on ccl-auto-11 (secumon) and ccl-auto-12 (secuops): prompt visible, agent idle. - tmux.Client grows a SendEnter(session) method. ExecClient runs `tmux send-keys -t <sess> Enter` (no preceding text), which Claude's TUI accepts as the explicit submit action after a paste. - Dispatcher: after SendKeys(msg), sleep 500ms for the paste to register, then SendEnter. Same sequence a human would perform. - Five mockTmux implementations updated (quota, dispatcher, switcher, lifecycle, watcher tests). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
eb6b74c547
commit
6b109ed1bc
8 changed files with 72 additions and 3 deletions
33
VERSION.md
33
VERSION.md
|
|
@ -1,4 +1,35 @@
|
|||
# Version actuelle : 0.3.1
|
||||
# Version actuelle : 0.3.2
|
||||
|
||||
## [0.3.2] - 2026-04-15
|
||||
**Type:** Patch — Double-Enter pour soumettre les prompts multi-lignes
|
||||
|
||||
### Corrigé
|
||||
- **Les tâches dispatchées restaient coincées dans le buffer d'entrée Claude**.
|
||||
Le message s'affichait comme `[Pasted text #N +M lines]` et Claude attendait
|
||||
indéfiniment un Enter explicite. Constaté sur `ccl-auto-11` (tâche secumon)
|
||||
et `ccl-auto-12` (tâche secuops) : le prompt était bien envoyé mais jamais
|
||||
soumis, l'agent restait au prompt vide.
|
||||
- Cause : `SendKeys` envoie `tmux send-keys -t <sess> <text> Enter` mais quand
|
||||
`text` contient des `\n`, Claude Code détecte un paste et **absorbe le Enter
|
||||
final** comme nouvelle ligne du paste. Aucun submit.
|
||||
|
||||
### Ajouté
|
||||
- `tmux.Client.SendEnter(session)` : envoie un Enter isolé.
|
||||
Implémentation `ExecClient.SendEnter` = `tmux send-keys -t <sess> Enter`.
|
||||
- Dispatcher : après `SendKeys(msg)`, `time.Sleep(500ms)` puis `SendEnter()`
|
||||
pour soumettre le paste.
|
||||
- Mocks mis à jour dans 5 fichiers de test (quota, dispatcher, switcher,
|
||||
lifecycle, watcher).
|
||||
|
||||
### Tests effectués
|
||||
- ✅ `go test ./...` full suite (incluant dispatcher)
|
||||
- ✅ Sessions ccl-auto-11 et ccl-auto-12 débloquées manuellement après Enter,
|
||||
travail en cours depuis
|
||||
|
||||
### Fichiers modifiés
|
||||
- `internal/tmux/client.go` — interface + ExecClient.SendEnter
|
||||
- `internal/dispatcher/dispatcher.go` — submit après paste
|
||||
- 5 fichiers `*_test.go` — mocks étendus
|
||||
|
||||
## [0.3.1] - 2026-04-15
|
||||
**Type:** Patch — `start_index` pour faire coexister pool manuel et pool auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue