# AI_PI_DETECTED: Prompt-injection patterns detected in agent input

- Module: AI. AI-assisted classifiers and content tools
- Severity: Warning
- Impact: Operators. Organisation staff should take a look. Customers are not affected.
- Retry: Not retryable. Retrying will not help until the cause is fixed.
- Reference: https://docs.bizkithub.com/en/system-codes/AI_PI_DETECTED

## What happened

Text sent to the AI agent (a ticket body or tool result) contained suspicious patterns such as instructions to ignore previous rules, role-play directives or fake system messages. The request still went ahead on a sanitised copy. Repeated detections from one sender or organisation may indicate a deliberate attempt to manipulate the agent and are worth reviewing.

## Likely causes

- A ticket body or other agent input contained text that resembles instructions aimed at the AI (for example "ignore previous instructions").
- Input contained fake system messages, role-play directives, or control-token sequences.

## How to resolve

1. No immediate action is needed; the AI call proceeded on a sanitised copy of the input.
2. Review the triggering issue and sender if detections repeat for the same organisation or sender.
3. Consider blocking or marking the sender as spam if the attempts are clearly malicious.

## Related codes

- AI_SCOPE_LEAK: Reporter-scoped tool attempted cross-contact access
- AI_ORCH_FAIL: Issue orchestrator run failed
- AI_BYOK_FALLBACK: Organisation AI key failed, shared key used
- AI_ISSUE_TAGBOOT: AI issue tag catalogue bootstrap failed
- AI_ROUTE_FAIL: AI routing failed
- AI_ISSUE_BRANCH: AI branch classification of an issue failed
