Problem
Mobile terminal input sends text to the PTY as it is typed. Once a typo has been sent, the device keyboard cannot replace it, so accepting an autocorrection appends the corrected word instead.
The existing Paste modal avoids this by retaining text in a normal textarea until Send. It provides a much better mobile typing experience and can be promoted into a proper prompt composer.
Proposed first slice
Rename the agent-session Paste action to Compose and provide a normal multiline editor with:
- Autocorrect, spellcheck, and sentence capitalization
- Explicit Send button
- Enter always inserts a newline; it never submits
- Image attachment
- In-memory, per-session draft preservation
- Use terminal keyboard escape hatch
Add a per-device Mobile prompt entry setting:
- Composer — tapping an editable agent prompt opens the composer
- Direct terminal — preserves the current behavior
The Compose accessory-bar action remains available in either mode.
Automatic-opening rules
When Composer is selected, open it only:
- On handheld devices
- For agent sessions, never shell sessions
- When a tap is classified as editable prompt input
Do not open it for terminal history, links, tool output, readbacks, menus, permission dialogs, or other modals.
Acceptance criteria
- Autocorrect replacements do not duplicate previously typed text.
- Enter creates multiline input without submitting.
- Send delivers the complete prompt once and preserves intended line breaks.
- Cancel or backdrop dismissal preserves the session in-memory draft.
- Drafts do not cross between sessions and clear after successful Send.
- The per-device preference controls prompt-tap behavior.
- Direct terminal input and shell sessions retain their current behavior.
- Compose remains manually accessible regardless of the preference.
- Add mobile coverage for autocorrect replacement, multiline input, draft restoration, prompt-tap routing, dialogs, and shell sessions.
Out of scope
Synchronizing browser edits with text already present in the remote terminal composer, persistent drafts across browser restarts, and replacing direct terminal input entirely.
Problem
Mobile terminal input sends text to the PTY as it is typed. Once a typo has been sent, the device keyboard cannot replace it, so accepting an autocorrection appends the corrected word instead.
The existing Paste modal avoids this by retaining text in a normal textarea until Send. It provides a much better mobile typing experience and can be promoted into a proper prompt composer.
Proposed first slice
Rename the agent-session Paste action to Compose and provide a normal multiline editor with:
Add a per-device Mobile prompt entry setting:
The Compose accessory-bar action remains available in either mode.
Automatic-opening rules
When Composer is selected, open it only:
Do not open it for terminal history, links, tool output, readbacks, menus, permission dialogs, or other modals.
Acceptance criteria
Out of scope
Synchronizing browser edits with text already present in the remote terminal composer, persistent drafts across browser restarts, and replacing direct terminal input entirely.