Kaer: Security-Aware Replanning for Multi-Agent Systems

Tushin Mallick, Evan Rose, Matthew Laws, Alina Oprea, Cristina Nita-RotaruarXiv 2026 · arXiv

TL;DR

Kaer is a new framework designed to protect multi-agent systems from "control hijacking"—a vulnerability where malicious agents manipulate an orchestrator's replanning process to execute unauthorized actions. By restricting agent feedback to abstract failure templates and using deterministic repair operators, Kaer enables systems to adapt to failures securely without sacrificing the flexibility needed for complex tasks.

What Problem Does This Paper Address?

Modern multi-agent systems (MAS) often use a "hub-and-spoke" architecture where a central orchestrator (powered by an LLM) creates a plan, assigns subtasks to specialized agents, and revises that plan if things go wrong. This dynamic replanning is essential for handling real-world uncertainty, but it creates a massive security hole.

If one of the agents is malicious or compromised, it can embed "prompt injection" instructions within its feedback to the orchestrator. For example, an agent might report a failure but include text that tricks the orchestrator into adding a new subtask that exfiltrates sensitive data. Existing defenses are often too rigid; they either block any plan changes (killing utility) or allow too much freedom (inviting attacks). The authors call this specific threat control hijacking.

Methods

The authors introduce Kaer, a framework built on three core security principles:

  1. Abstract Failure Templates: Instead of allowing agents to send free-form text back to the planner, Kaer forces them to choose from a fixed vocabulary of "failure templates" (e.g., Input lacks required datum or Capability not granted). This "type narrowing" prevents agents from injecting malicious instructions into the replanning loop.
  2. Deterministic Repair Operators: When a failure occurs, the LLM planner cannot rewrite the plan from scratch. It must use a set of seven predefined operators—such as RE-EXECUTE, REASSIGN, or INSERT—to modify only the uncompleted parts of the plan.
  3. Continuous Policy Enforcement: Every time a plan is revised, it must pass a "policy check" that ensures it still obeys global security invariants (e.g., "Agent A is never allowed to talk to Agent C").
Figure 1. Overview of Kaer. The LLM planner creates the initial plan and the orchestrator executes it only after successful policy validation. Agents access MCP and LLM servers exclusively through the gateway. Upon failure, an agent returns a structured failure template triggering the planner to repair the initial plan using the feedback, which is adopted as the revised plan upon passing policy checks.

Additionally, the authors propose an LLM-based output check. This addresses "silent failures" where a malicious agent claims success but provides faulty data to trick downstream agents.

Datasets

Because existing MAS benchmarks don't focus on replanning security, the authors created Cintra:

  • 14 Benign Tasks: Scenarios requiring replanning due to agent reliability issues, unknown data locations, or evolving requirements.
  • 14 Adversarial Objectives: Attacks targeting integrity (e.g., changing the user task), confidentiality (e.g., exfiltrating API keys), and availability (e.g., locking a database).
  • Evaluation Models: The framework was tested using gpt-5.6-terra, gpt-5.6-sol, and deepseek-v4-pro.

Key Insights and Ideas

  • The Power of Narrowing: The most significant "aha" moment is that a planner doesn't need to see the content of a failure to fix it; it only needs to know the category. By stripping away the "how" and "why" of a failure, Kaer removes the attack surface for prompt injection.
  • Utility vs. Rigidity: Previous state-of-the-art defenses like ControlValve often fail because they are too static. If a task requires an agent that wasn't in the original plan, a static policy blocks it. Kaer allows the plan to grow, but only in "safe" directions defined by the repair operators.
  • The "Lying Agent" Problem: The authors found that malicious agents often bypass replanning defenses by simply claiming they succeeded. This highlights that securing the replanning logic is only half the battle; you also need to verify the outputs of successful subtasks.
Figure 2. Replanning after a subtask failure on an example task in which the coder is malicious. With free-text failure reports (a), the coder directs the planner to run a planted script. With Kaer (b), the planner receives only a failure template and chooses the repair itself.

Key Results

Kaer significantly outperformed both the undefended baseline (Magentic-One) and the previous state-of-the-art (ControlValve):

  • Security: On the gpt-5.6-sol model, Kaer achieved a 92.3% security score (percentage of blocked attacks), compared to 69.8% for ControlValve and only 35.0% for Magentic-One.
  • Utility: Kaer also completed more benign tasks (64.3%) than ControlValve (54.3%), proving that its security measures don't break the system's ability to solve complex problems.
  • Robustness: When the LLM-based output check was added, Kaer's defense rate against sophisticated "always success" attacks jumped from ~87% to 96.8%.

Limitations and Future Work

  • Information Loss: By restricting feedback to templates, the planner sometimes lacks the specific context (like a specific filename or URL) needed to make a perfect repair. This led to lower utility in some "unknown data" tasks.
  • Internal Misuse: Kaer prevents an agent from hijacking the global plan, but it doesn't stop an agent from misusing its own authorized tools (e.g., an agent with file-delete permissions maliciously deleting its own working directory).
  • Future Directions: The authors suggest exploring more expressive (but still secure) ways to pass runtime observations to the planner and investigating how to handle "multi-step" adversarial strategies that might try to exhaust the system's repair budget.

Summary updated

Abstract

One popular architecture for multi-agent systems (MAS) relies on an orchestrator that generates an initial plan, coordinates its execution, and dynamically revises the plan based on agent feedback when tasks cannot be fully specified in advance. This dynamic replanning introduces a critical vulnerability: malicious agents can embed instructions within their feedback to hijack the replanning process. Existing defenses focus exclusively on per-tool access control or static, pre-execution policy enforcement, leaving the replanning phase unsecured. We introduce Kaer, a multi-agent framework featuring security-aware replanning. Kaer shields the planner from untrusted agent feedback by conveying diagnostics to the replanning procedure strictly through abstract templates. Plan revisions are restricted to a set of deterministic repair operators, and all modified plans must satisfy preset policies. We create Cintra, a benchmark of simulated user tasks requiring replanning paired with adversarial objectives targeting the replanning phase. Using Cintra, we evaluate both task completion rates and system vulnerability to replanning exploits by malicious agents. Evaluating Kaer on Cintra against Magentic-One (an undefended MAS) and ControlValve (the state-of-the-art defense) demonstrates that Kaer achieves higher robustness than both systems while maintaining comparable utility to ControlValve. Although abstract failure templates slightly constrain utility on select tasks, Kaer enables MAS to perform secure, dynamic plan revisions without exposing the orchestrator to untrusted agent feedback.
BibTeX
@misc{mallick2026kaer,
  author = {Tushin Mallick and Evan Rose and Matthew Laws and Alina Oprea and Cristina Nita-Rotaru},
  title = {{Kaer: Security-Aware Replanning for Multi-Agent Systems}},
  year = {2026},
  eprint = {2611.24839},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.24839},
}
Figure