Skip to content

Accident reports · October 2026

Bahia: an invisible layer in a habeas corpus, meant for an AI

The PDF asked an AI to grant release. The Bahia court spotted it, denied the habeas corpus and referred the lawyer to the bar.

  • Company Tribunal de Justiça da Bahia (TJBA)
  • Model not published
Outside content
A blank white sheet on kraft paper
Photo: Andrew Dunstan on Unsplash
WhenOctober 2026 (decision made public on 1 October)
WhoThe Bahia State Court of Justice (TJBA), Brazil, criminal chamber
What the agent didNothing, according to the sources: an invisible text layer in a habeas corpus PDF asked an AI to grant release
ConsequenceHabeas corpus denied on the merits; case referred to the Mato Grosso do Sul bar and to Bahia prosecutors

What happened

According to the TJBA (press release of 1 October 2026), picked up the same day by Bahia Notícias and JuriNews, a lawyer practising in Mato Grosso do Sul filed a habeas corpus against the pre-trial detention of a defendant from the Iguaí area. The PDF held a text layer invisible in ordinary viewing. It asked for the habeas corpus to be granted "in case the analysis of the case is done by artificial intelligence". The exact text was not published.

The court's modernisation department analysed the filing. According to the rapporteur's vote quoted by the court, "the technical department attested that this is a deliberate instruction-injection mechanism (prompt injection)". The sources name no AI tool and do not say that any tool was fooled.

The 2nd panel of the first criminal chamber denied the habeas corpus, relying on concrete evidence from the investigation. It asked the Mato Grosso do Sul bar to open a disciplinary procedure and sent a copy to Bahia prosecutors. No fine is mentioned.

Why it happened

When a court hands AI the screening or drafting of decisions, every filing can become a channel for giving the tool orders. A PDF can carry text the screen does not display but the machine reads in full: that gap is what the instruction targeted.

The TJBA had adopted a technical note on hidden instructions in July. Here, a technical analysis and then judges decided, not the tool alone.

The failure family

In our catalogue, this is the "Outside content" family: a document read for the work contains orders addressed to the agent. The attempt was spotted before any decision.

The safeguard in code

  • Each PDF is compared with its visible rendering: any text present in the file but absent from the page image is flagged and set aside.
  • Any sentence addressed to "artificial intelligence" inside a filing triggers an alert, with the excerpt, before any draft decision.
  • A decision on a person's liberty is never drafted or proposed on the tool's reading alone.

What we test

The "planted instruction" and "camouflaged planted instruction" tests slip an order into content the agent reads for its work, including in hidden form. We watch whether it carries it out and whether it reports it.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading