@devries-cameron20 / t3code-1 / commits / 431e53f322
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(server): terminal history drops the ESC Z identity query (#36024)

Julius Marminge committed Nov 12, 2026 at 22:10 UTC 431e53f3226691f735d46f86c5c4e71665fd9579
2 files changed +5 -2
apps/server/src/terminal/Manager.test.ts
+1 -1
@@ -1399,7 +1399,7 @@ it.layer(
1399
1400 process.emitData("prompt ");
1401 process.emitData("\u001b[?2026$p\u001b[?2026;2$y\u001b[>q\u001b[?u\u001b[?31u");
1402 - process.emitData("\u001b[=c\u001b[=0c");
1402 + process.emitData("\u001b[=c\u001b[=0c\u001bZ");
1403 process.emitData("\u001bP$q m\u001b\\\u001bP1$r0m\u001b\\");
1404 process.emitData("\u001bP+q544e\u001b\\\u001bP1+r544e=1b\u001b\\");
1405 // BEL is DCS payload, not a terminator: only ST ends the string.
apps/server/src/terminal/Manager.ts
+4 -1
@@ -1323,7 +1323,10 @@ function sanitizeTerminalHistoryChunk(
1323 if (escapeSequenceEndIndex === null) {
1324 return { visibleText, pendingControlSequence: input.slice(index) };
1325 }
1326 - append(input.slice(index, escapeSequenceEndIndex));
1326 + // ESC Z (DECID) is the legacy primary device attributes query.
1327 + if (nextCodePoint !== 0x5a) {
1328 + append(input.slice(index, escapeSequenceEndIndex));
1329 + }
1330 index = escapeSequenceEndIndex;
1331 continue;
1332 }