The decisive evidenceA completion menu, mangled command, or bare PS2 prompt points to readline. Replaced characters without that evidence keep PTY transport corruption open.

Route the terminal tail, not the symptom.

Completion or PS2

Missing UTF-8 locale lets readline treat bytes as Meta keys.

Characters replaced

Test command serialization and one-write PTY transport separately.

Output, no marker

Inspect wrapper and prompt-marker detection.

Why it looks random.

Spawnbash -i
Environmentno LANG
Readlinebyte binding
Waitprompt absent

Only some UTF-8 byte sequences select a blocking binding. One CJK command can pass while another opens completion or leaves Bash waiting for a continuation.

Use the narrow workaround.

- id: terminal-bash
  name: '@deepseek-ai/dsh-terminal-bash'
  config:
    timeoutMs: 300000
    shellArgs: [--noprofile, --norc, --noediting, -i]
Do not just extend the timeout.

Disable readline in the actual preset loader row, create a new Session, and repeat a side-effect-free A/B matrix. A settings block with no registered namespace does not configure the plugin.

Acceptance gates.

Primary evidence.

Keep the complete compatibility runbook.

The canonical guide includes the diagnostic matrix, exact preset workaround, durable fix boundary, and eight regression gates.

Read the full runbookStar on GitHub