{"found":true,"collection":"patterns","library_url":"https://www.grokbotdb.com/library/pat.script-not-loop","generated":"2026-09-06T05:32:11Z","citation":["Quote the record id and its source_url (or provenance if there is no URL).","Include last_verified or observed_at when present. Do not present an old date as current.","If tier is community and confidence is low, say so. Do not launder it into a fact.","If the database does not hold the answer, say that. Do not invent Grok Bot product claims.","Contradictions are data: when conflicts_with is present, report both records rather than picking a favourite.","Deprecated and removed records stay visible. They are history, not current guidance."],"record":{"id":"pat.script-not-loop","name":"Anything that loops should be a script","category":"cost","problem":"A long looping task run inside chat bills every iteration as agent steps.","technique":"Have a coding agent write a script once; the Bot then runs the file.","why_it_works":"The loop moves off the agent-step meter and onto a single execution.","when_to_use":"Bulk processing, repeated extraction, anything iterative.","manual_ref":"4.2","evidence":"reported","attributed_to":"@kloss_xyz","source_url":"https://x.com/kloss_xyz/status/2093680229462269953","related":["pat.offload-token-heavy-work","pat.browser-to-api-reversal","pat.outer-loop"],"confidence":"high","first_seen":"2026-09-03","last_verified":"2026-09-03"}}