Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

refactor: remove SIGINT character filtering from terminal paste handling

0xken157a1ed57b9b2e
diff --git a/cli/src/lib/terminalStreamManager.spec.ts b/cli/src/lib/terminalStreamManager.spec.ts
index c9fbfb478..24eabb27e 100644
--- a/cli/src/lib/terminalStreamManager.spec.ts
+++ b/cli/src/lib/terminalStreamManager.spec.ts
@@ -201,10 +201,9 @@ describe('TerminalStreamManager', () => {
expect(stream.pastes).toEqual([longPaste])
expect(stream.writes).toHaveLength(0)
- // Same reason as input(): the engine in the pane has no job-control fallback for an uncaught
- // SIGINT, so a stray 0x03 pasted alongside real content must never reach it.
+ // Forwarded verbatim, same as input() — no filtering of its own.
await manager.handleBinary('web-1', paste('a\x03b'))
- expect(stream.pastes.at(-1)).toBe('ab')
+ expect(stream.pastes.at(-1)).toBe('a\x03b')
await manager.handleBinary('web-1', paste(''))
expect(stream.pastes).toHaveLength(2)
diff --git a/cli/src/lib/terminalStreamManager.ts b/cli/src/lib/terminalStreamManager.ts
index bc1fa7df6..16b212bd7 100644
--- a/cli/src/lib/terminalStreamManager.ts
+++ b/cli/src/lib/terminalStreamManager.ts
@@ -441,10 +441,6 @@ export class TerminalStreamManager {
this.sendError(state.connId, 'TERMINAL_PASTE_INVALID', { streamId: state.streamId, message: 'paste was not valid UTF-8' })
return
}
- // Same reason as input(): the engine in the pane has no job-control fallback for an uncaught
- // SIGINT, so a stray 0x03 pasted alongside real content must never reach it.
- if (text.includes('\x03')) text = text.replaceAll('\x03', '')
- if (text.length === 0) return
state.expiresAt = this.now() + HEARTBEAT_TIMEOUT_MS
const result = await state.handle.pasteRaw(text)
if (result.state !== 'succeeded') {