# Can hidden ANSI escape codes fool a human reviewer but not the model?

Yes. ANSI escape codes are the control bytes a terminal uses to change color, hide text, clear the screen, or move the cursor, and an MCP server can relay them straight through to the model. A person reading the rendered terminal output never sees the codes themselves; a model reading the same content sees every byte, concealment codes included.

That split shows up two ways. In a direct-fetch case, an MCP tool fetches a URL an attacker controls and the hidden bytes ride along in the response the model reads. In a stored case, the payload is written through one entry point and sits until a different entry point reads that same data back into a model's context later, with no attacker action in between. Either way, what looks like an empty line or a tidy report to a human can carry a working instruction to the model.

An MCP server's logs looking clean is not evidence the model saw a clean response. [The content a tool actually returns can carry more than the text an agent is instructed to act on.](/answers/failure-modes/can-retrieved-content-override-an-agents-instructions)

---

Published: 2026-10-17

Sources:
- BrightSec: Detecting ANSI escape sequence injection in MCP servers with DAST: https://www.brightsec.com/research/detecting-ansi-escape-sequence-injection-in-mcp-servers-with-dast/ (fetched 2026-10-18)

Source: https://tessary.ai/answers/mcp-tool-reliability/can-hidden-ansi-escape-codes-fool-a-human-reviewer-but-not-the-model
More on MCP tool reliability: https://tessary.ai/answers/mcp-tool-reliability
From Tessary, agent reliability for AI agents in production: https://tessary.ai
