How invisible characters encode instructions
The characters involved render as nothing on screen, so text that looks empty or ordinary to a person can still carry instructions. Three classes are covered in this guide:
- Unicode tag characters
- Zero-width characters
- Bidirectional controls
Following a hidden payload through the agent pipeline
Where a hidden payload can be stopped
- Ingestion
Untrusted documents, email, web pages, tool outputs, and MCP-connected data enter the agent context.
- Input handling
Normalization and character-class filtering remove or flag invisible code points.
- Model interpretation
The model may tokenize hidden text and treat it as an instruction.
- Tool-call enforcement
Policy checks, scoped permissions, and audit logs limit impact if the earlier layers fail.
Why visual review and basic filtering miss it
Reviewers and simple filters miss these characters because they render as nothing, but a model may still read them. What a person sees and what the model receives can therefore differ, which is why review of the visible text is not a sufficient control.
Input-layer mitigations and their tradeoffs
Input normalization and character-class filtering remove or flag invisible code points before the model sees them. Filtering should use configurable character classes, and it needs to be checked against legitimate multilingual and emoji content, since false positives are the main tradeoff. Because no single layer is complete, the controls below assume some payload will pass.
Layering controls for when filtering fails
Assume some payload will pass. The next layers inspect what the model produces and constrain what it can do.
Output and tool-call inspection
Output and tool-call inspection checks proposed actions against policy: which tool, which arguments, which destination, and whether the action matches the task the user requested. Because a manipulated model can generate a convincing request, this decision should be enforced outside the model.
Least-privilege permissions
Least-privilege permissions reduce the consequence of a followed instruction. Scope each agent to the tools and data its task requires, and require approval for sensitive actions such as external sends or writes to production systems. An agent that cannot reach a destination cannot be directed to exfiltrate data there, regardless of what it read.
Audit logging
Audit logging supports detection and response. Logs should connect the raw input, the policy decision, and the resulting tool call, so investigators can trace an unexpected action back to hidden content. Runtime governance platforms, including Trussed AI's runtime policy enforcement, agent permissions, tool approval workflows, and audit logging, address these enforcement and evidence layers. They limit impact when input filtering fails and do not replace input handling.