Some requests crash whatever runs them, like a prompt that trips a kernel bug. The SRE book calls the general case a query of death: a request whose contents make the process fail.
In inference the damage is bigger than one request. When a worker crashes, every sequence in its decode batch loses its lease.
So a poison request retried blindly takes the rest of its decode batch down with it, on a fresh worker each time. With 128 sequences in a decode batch, that's 127 others.
Count crashes per request. After two, stop retrying the normal way.
Rerun the suspects alone or in small groups on an isolated worker, halving the group each time, until the crashing one is found. That's a bisection.
Mark it errored and put it in a dead-letter queue, a separate queue for messages that can't be processed. Amazon alarms on any message in that queue, because each one means a bug that needs fixing.
worker(poison) in the editor builds an isolated worker: its crashes(group) returns True when the group holds the poison. Write find_poison(suspects, crashes): run half the group, keep whichever half holds the poison, and repeat until one suspect is left. Return it and the number of runs.