···2525- stdin text
2626- `--no-enter`
27272828+## Wait behavior
2929+3030+By default, `send` waits for the delivered command to finish before returning. This relies on shell integration (OSC 133) to detect command completion. When the command finishes, the response includes exit code and duration.
3131+3232+- `--no-wait`: return immediately after text delivery without waiting for completion.
3333+- `--timeout <seconds>`: maximum time to wait (default: 30, range: 1–300). Ignored when `--no-wait` is used.
3434+- If the terminal does not have shell integration enabled, the wait will time out and return `WAIT_TIMEOUT`.
3535+2836### Input source semantics
29373038`data.input.source` is **inferred from where the accepted payload came from**. It is not a separate `--source` flag.
···7280 "bytes": 10,
7381 "trailing_enter_sent": true
7482 },
7575- "created_tab": false
8383+ "created_tab": false,
8484+ "wait": {
8585+ "exit_code": 0,
8686+ "duration_ms": 1234
8787+ }
7688 }
7789}
7890```
···124136- boolean
125137- `true` only when targeting a worktree that had no current tab and Prowl had to create one before sending.
126138139139+## `data.wait`
140140+141141+- object or `null`
142142+- `null` when `--no-wait` is used (fire-and-forget mode).
143143+- When present (default behavior), contains:
144144+ - `exit_code`: integer or `null`. The command's exit code reported by shell integration (OSC 133;D). `null` if the shell did not report an exit code.
145145+ - `duration_ms`: integer. Wall-clock time in milliseconds from text delivery to command completion.
146146+127147## Output invariants
128148129149- The payload must describe the **resolved pane** that received the text.
···153173- `TARGET_NOT_UNIQUE`
154174- `EMPTY_INPUT`
155175- `SEND_FAILED`
176176+- `WAIT_TIMEOUT`
156177157178## Notes
158179159180- `send` is text delivery, not general key simulation. Control inputs such as `ctrl-c` belong to `key`.
160181- Returning byte and character counts gives scripts enough confirmation without leaking payload contents into logs.
161182- A future implementation may add optional debug echo flags, but v1 default JSON must stay redaction-friendly.
183183+- Wait behavior depends on shell integration (OSC 133). Without it, `onCommandFinished` never fires and the wait will time out. The `WAIT_TIMEOUT` error message should hint at this possible cause.
184184+- `--no-wait` combined with `--no-enter` is the purest "paste text" mode — no Enter, no waiting.
185185+- A future `--capture` flag may return the command's output text alongside `wait`, pending upstream support for reading semantic zone data via the Ghostty C API.
162186163187## Example: stdin + `--no-enter`
164188···194218 "bytes": 24,
195219 "trailing_enter_sent": false
196220 },
197197- "created_tab": false
221221+ "created_tab": false,
222222+ "wait": {
223223+ "exit_code": 0,
224224+ "duration_ms": 350
225225+ }
226226+ }
227227+}
228228+```
229229+230230+## Example: `--no-wait` (fire-and-forget)
231231+232232+```json
233233+{
234234+ "ok": true,
235235+ "command": "send",
236236+ "schema_version": "prowl.cli.send.v1",
237237+ "data": {
238238+ "target": {
239239+ "worktree": {
240240+ "id": "Prowl:/Users/onevcat/Projects/Prowl",
241241+ "name": "Prowl",
242242+ "path": "/Users/onevcat/Projects/Prowl",
243243+ "root_path": "/Users/onevcat/Projects/Prowl",
244244+ "kind": "git"
245245+ },
246246+ "tab": {
247247+ "id": "2FC00CF0-3974-4E1B-BEF8-7A08A8E3B7C0",
248248+ "title": "Prowl 1",
249249+ "selected": true
250250+ },
251251+ "pane": {
252252+ "id": "6E1A2A10-D99F-4E3F-920C-D93AA3C05764",
253253+ "title": "zsh",
254254+ "cwd": "/Users/onevcat/Projects/Prowl",
255255+ "focused": true
256256+ }
257257+ },
258258+ "input": {
259259+ "source": "argv",
260260+ "characters": 5,
261261+ "bytes": 5,
262262+ "trailing_enter_sent": true
263263+ },
264264+ "created_tab": false,
265265+ "wait": null
198266 }
199267}
200268```