---
title: Tip: keep response headers out of your agent's context unless a task needs them | ctxsec
url: https://ctxsec.com/items/tip-agent-fetch-strip-headers
description: ""
status: "how-to"
published: 2026-10-16
---

> 

[← Tips & Guides](/tips) · [markdown](/items/tip-agent-fetch-strip-headers.md)

how-to

2026-10-16

### Tip: keep response headers out of your agent's context unless a task needs them

Based on Signals Corps' header scan: prefer fetch tools that return only the body, and if agents use a shell, have them call `curl -s` rather than `curl -i` or `-v`. Wrap anything that does reach the model (redirect targets, error bodies, Content-Type) in the same untrusted-content markers as page text, and don't phrase prompts that tell the agent to 'follow the site's instructions', which is what made test injections work. Give web-reading agents no database or shell power they don't need, since an injected order only matters if the agent can act on it.

Sources: [Signals Corps: Prompt injection in HTTP headers](https://www.signalscorps.com/blog/prompt-injection-in-http-headers/)
