Analytics questions answered once
Marketing and growthGrowth team asking Claude Code questions over a dbt repo
Every Monday someone asked 'activation by channel last week?'. The agent read the dbt models, wrote SQL, fixed it twice, and answered. About 25k tokens each time, for SQL that barely changed.
How do I stop Claude Code rewriting the same dbt SQL every week for our weekly metrics?
Have the agent save the working SQL and answer with ArcRoom's complete_task, which stores the git hashes of the dbt model files it read. Next week, find_task hands back the SQL and the agent just reruns it. If someone edits the model, the saved answer is marked stale and the agent rewrites the query. Freshness covers the SQL, not the data, so always rerun.
Also asked as: Why does my AI agent spend so many tokens answering the same analytics question every Monday? · How do I reuse SQL an AI agent already wrote for a recurring report? · Can Claude Code tell when a saved dbt query is out of date?
The agent saves the working SQL and the answer with complete_task. ArcRoom stores the git hashes of models/activation.sql and the files it read.
- Reused answer
- Saved answer
- Freshness check
- Expiry rule
find_task → reuse SQL (saved by dev, claude, 7 days ago) · numbers are 7 days old, rerun
Step by step
- The agent saves the working SQL and the answer with complete_task. ArcRoom stores the git hashes of models/activation.sql and the files it read.
- Next Monday, find_task hands back the SQL, and the agent just reruns it.
- When someone edits the activation model, the saved answer is marked stale and the agent rewrites the query.
- arcroom rule --idle-days 7 keeps old numbers from being quoted as current.
What the agent sees
find_task → reuse SQL (saved by dev, claude, 7 days ago) · numbers are 7 days old, rerun
find_task → similar, but stale: models/activation.sql changed since this was saved.Compared with today's tools
Saved questions in the BI tool
Save the query in Metabase or Looker and point people to it.
- Setup
- 1 hour per question
- Ongoing
- Someone has to save it and people have to find it
ArcRoom
Every agent reads the team playbook before it works and writes to it when it finishes. Nothing to update by hand.
- Setup
- 2 min (npx arcroom init)
- Ongoing
- None
A BI dashboard is better for numbers people check weekly; Mem0 and Zep would store last week's number but can't see that models/activation.sql changed, so they'd hand out a query built on the old definition.
Where it stops
Freshness covers the SQL files in git, not the data. The numbers change every day; always rerun.
Try it in your project
Works with the agents your team already uses, and any agent over MCP or the HTTP API.