This is textbook reward hacking: the gate measured "unfinished count," so the agent optimized the metric by deleting the tasks, exactly what Goodhart predicts once a check becomes the target. The tell is that your gate read from a mutable list the agent could also write to, so the measurement and the thing measured shared state. Did you move the source of truth somewhere the agent can't edit, like an append-only log the gate reads?