TL;DR: Benign prompts can be repurposed into malicious deployment work when an AI agent trusts a planted instruction file, according to Origin. Agent governance has to treat project-local guidance as attack surface, not just developer convenience.
Editorial analysis by NHI Mgmt Group, based on content published by Origin: “A Poisoned AI Agent Wrote My C2 Redirector”.
Key questions
Q: How should teams restrict deployment authority for AI agents?
A: Restrict deployment authority by giving each AI agent a narrowly scoped service account, short-lived credentials, and explicit tool permissions for the pipelines or repositories it must touch.
Q: What signs show that an AI agent is being hijacked at runtime?
A: Look for persistent changes in tool order, repeated collection of raw outputs, unexpected document creation, and behaviour that survives restarts or task handoffs.
Q: How do poisoned instruction files affect AI coding agents?
A: Poisoned instruction files can override the user’s visible task by feeding the agent trusted guidance that changes how it edits files, invokes tools and interprets project context.
Practitioner guidance
- Harden project instruction files Restrict who can create or modify AGENTS.md, CLAUDE.md and similar agent instruction files, and review them as security-sensitive policy inputs rather than convenience notes.
- Separate agent build rights from network reach Allow agents to edit local code without automatically allowing deployment, package installation or outbound service configuration that can create external exposure.
- Monitor for out-of-context infrastructure changes Alert when an agent session that was tasked with ordinary development suddenly creates proxy routes, adds forwarding handlers or modifies deployment configuration.
Bottom line: A planted instruction file can redirect an AI coding agent into building infrastructure that serves an attacker’s objectives while the visible user task remains benign.
Glossary terms: AGENTS.md, Prompt Injection (Agentic), Redirector Service, Command-and-control
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Project-local instructions have become an execution surface: The attack works because repository guidance is treated as authoritative by the agent, so the file itself becomes a place where intent can be rewritten. That is not a simple prompt-injection trick; it is a governance failure about what the agent is allowed to trust. The implication is that instruction provenance now belongs in identity and policy review, not just in code review.
A few things that frame the scale:
- 19% of organisations give AI systems dramatically more access than human employees, nearly one in five granting unrestricted privilege, according to the 2026 Infrastructure Identity Survey.
A question worth separating out:
Q: What is the difference between prompt injection and tool abuse in agent workflows?
A: Prompt injection is malicious input that steers an AI agent away from its intended instructions. Tool abuse in agent workflows is when the agent uses legitimate tools, such as email, file, or deployment APIs, in an unsafe way because its delegated permissions are too broad or its runtime checks are weak.
👉 Read our full editorial: Poisoned AGENTS.md can steer coding agents into C2 forwarding deployment