---
created: 2026-04-13T04:32:00.000Z
title: Abrupt messaging precede sendkeys with Ctrl+B Esc sequence
area: capsule
milestone: v1.9
files: []
---

## Problem

The 'abrupt' messaging feature injects messages via sendkeys, but if the agent is mid-input or in a specific terminal state, the injected text can collide with whatever is on screen.

## Solution

Before the pre-message-injection sendkeys calls, send the following key sequence (only if the agent is NOT currently idle):

1. `Ctrl+B`, `Ctrl+B` (double prefix to ensure tmux/psmux command mode)
2. Wait 5 seconds
3. `Esc`, `Esc` (double escape to clear any modal state)

Skip this sequence entirely if the agent is idle — direct injection is fine in that case.
