{"agent":"claude","input":"Find repeat customers who are late to reorder, as of 2026-11-23. Use the neon connection, project roastery-shop, database neondb, read only. First run_sql on information_schema.columns to confirm: customers(id, first_name, email, marketing_opt_in), orders(id, customer_id, status, created_at), order_items(order_id, product_name, quantity), subscriptions(customer_id, status). If any is missing, stop and list what is missing. Using only SELECT: for customers with at least 3 orders with status 'paid', compute the median days between consecutive paid orders and the last paid order date. Keep customers where days since last order >= median + 7 and last order within 90 days. Exclude customers with a subscriptions row where status = 'active', and customers where marketing_opt_in is false. Page every query with ORDER BY customer id, LIMIT 100 and OFFSET until a page returns fewer than 100 rows. For each kept customer, find their most-ordered product_name by total quantity. Write reorder.csv (customer_id, first_name, email, usual_product, median_days, days_since_last, days_late) sorted by days_late descending, and reorder.md with the count by usual_product. Never run INSERT, UPDATE, DELETE or DDL.","connections":["neon"]}