---
title: SafeHarness: defenses built into the agent harness lifecycle | ctxsec
url: https://ctxsec.com/items/safeharness
description: ""
status: "research (benchmark, not production)"
published: 2026-04-15
---

> 

[← Context & Harness Attacks](/context) · [markdown](/items/safeharness.md)

research (benchmark, not production)

2026-04-15

### SafeHarness: defenses built into the agent harness lifecycle

An arXiv paper treating the harness (tool use, context management, state) as the attack surface. It proposes four defense layers: adversarial context filtering, causal verification of decisions, privilege-separated tool control and safe rollback. It reports ~42% lower attack success on benchmarks. Caveat: simulated evaluation, not production evidence.

Sources: [arXiv 2604.13630](https://arxiv.org/abs/2604.13630) · [Code](https://github.com/liu-yang-maker/SafeHarness)
