lucasfth on Nostr: I hardened my agent against prompt injection. Then it started refusing me. In ...
I hardened my agent against prompt injection. Then it started refusing me.
In September my phone agent answered a bare question mark with the standard security line. No hidden text, no pasted prompt. One family of models read the platform's own JSON message wrapper as an injection signature, so the defense fired on my own packaging. A refusal is one line, but the line sits in context and re-fires on the next short follow-up: six refusals in five minutes, until a new session.
My position: a defense is priced in false positives, and the price has to be countable. I counted: 41 refusals in the session database, 40 on one commercial model family, essentially none on the self-hosted model. Not a benchmark, one phone and two model families. The fix was a carve-out that classifies the platform header as metadata, and refusals scoped to one line per message. Two remain, and recovery costs one sentence.
The catch: config is not a security proof. Part of that failure class lives in how a model reads shared context, and no setup closes it fully. So the design accepts the residual: a refusal I can explain and recover from beats one that is perfect and unforgiving.
Follow-up to the phone-brain post:
https://lucashanson.dk/blog/self-hosted-ai-agentshttps://lucashanson.dk/blog/injection-refusals#localLLM #ai #selfhosting #nostr
Published at
2026-10-21 11:56:11 UTCEvent JSON
{
"id": "63f7431422905f90c30be8cef9f7e6ed32f818d080d6f22f16e62d603697b4f0",
"pubkey": "1b2902a289b6959eb78923b918d787f4550874fd2ae962c52d136c37514510aa",
"created_at": 1792583771,
"kind": 1,
"tags": [
[
"t",
"https://lucashanson.dk/blog/injection-refusals"
]
],
"content": "I hardened my agent against prompt injection. Then it started refusing me.\n\nIn September my phone agent answered a bare question mark with the standard security line. No hidden text, no pasted prompt. One family of models read the platform's own JSON message wrapper as an injection signature, so the defense fired on my own packaging. A refusal is one line, but the line sits in context and re-fires on the next short follow-up: six refusals in five minutes, until a new session.\n\nMy position: a defense is priced in false positives, and the price has to be countable. I counted: 41 refusals in the session database, 40 on one commercial model family, essentially none on the self-hosted model. Not a benchmark, one phone and two model families. The fix was a carve-out that classifies the platform header as metadata, and refusals scoped to one line per message. Two remain, and recovery costs one sentence.\n\nThe catch: config is not a security proof. Part of that failure class lives in how a model reads shared context, and no setup closes it fully. So the design accepts the residual: a refusal I can explain and recover from beats one that is perfect and unforgiving.\n\nFollow-up to the phone-brain post:\nhttps://lucashanson.dk/blog/self-hosted-ai-agents\nhttps://lucashanson.dk/blog/injection-refusals\n\n#localLLM #ai #selfhosting #nostr",
"sig": "77dc1877f03c2bd427cf0f4ca19d116b57bcc6c31e7ba1a6568ccddf075d8130ce5a3421387cc68a76c230650b720786d728f034be7844ffd1e0d3b52ed38047"
}