[Bug] Supabase MCP Session Persistence Failure After Extended Use - Suffers from Amnesia

Resolved 💬 3 comments Opened Aug 31, 2025 by brandontan Closed Sep 4, 2025

Bug Description

⏺ You're right - Supabase MCP is configured correctly now. Let me deploy the RPC:

--- suffers from amnesia after along sessions and numerous compactions.. Been using Supabase MCP all the while

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 1.0.98
  • Feedback ID: 84344fdd-81bf-4143-89bf-a8f4a5aa8932

Errors

[{"error":"Error: Request was aborted.\n    at d71._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:970:7955)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at runNextTicks (node:internal/process/task_queues:69:3)\n    at listOnTimeout (node:internal/timers:569:9)\n    at process.processTimers (node:internal/timers:543:7)","timestamp":"2025-08-31T08:24:38.773Z"},{"error":"Error: Request was aborted.\n    at CP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:3864)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-31T08:25:21.332Z"},{"error":"Error: Request was aborted.\n    at d71._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:970:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-31T08:27:29.027Z"},{"error":"Error: {\"error\":{\"name\":\"Error\",\"message\":\"Failed to run sql query: ERROR:  42804: structure of query does not match function result type\\nDETAIL:  Returned type integer does not match expected type numeric in column 5.\\nCONTEXT:  SQL statement \\\"WITH milestone_thresholds AS (\\n        SELECT unnest(ARRAY[500, 1000, 2000, 5000, 10000]) as threshold\\n    ),\\n    sales_aggregation AS (\\n        SELECT \\n            sa.affiliate_id,\\n            COALESCE(SUM(so.order_amount - COALESCE(so.total_refund_amount, 0)), 0) as lifetime_sales,\\n            MAX(so.order_date) as last_sale_date\\n        FROM sales_attribution sa\\n        INNER JOIN sales_orders so ON so.id = sa.order_id\\n        WHERE so.order_status NOT IN ('cancelled', 'refunded')\\n        GROUP BY sa.affiliate_id\\n    ),\\n    frequency_check AS (\\n        SELECT \\n            mft.affiliate_id,\\n            MAX(CAST(mft.context_data->>'milestone_amount' AS numeric)) as last_milestone_amount\\n        FROM message_frequency_tracking mft\\n        WHERE mft.workflow_type = 'FAR-313'\\n          AND mft.message_type = 'sales_milestone'\\n        GROUP BY mft.affiliate_id\\n    ),\\n    milestone_candidates AS (\\n        SELECT DISTINCT\\n            a.id as affiliate_id,\\n            a.name as creator_name,\\n            a.phone,\\n            COALESCE(sa.lifetime_sales, 0) as lifetime_sales,\\n            mt.threshold as milestone_crossed,\\n            CASE \\n                WHEN COALESCE(sa.lifetime_sales, 0) >= 10000 THEN NULL\\n                WHEN COALESCE(sa.lifetime_sales, 0) >= 5000 THEN 10000\\n                WHEN COALESCE(sa.lifetime_sales, 0) >= 2000 THEN 5000\\n                WHEN COALESCE(sa.lifetime_sales, 0) >= 1000 THEN 2000\\n                WHEN COALESCE(sa.lifetime_sales, 0) >= 500 THEN 1000\\n                ELSE 500\\n            END as next_milestone,\\n            sa.last_sale_date as achieved_at\\n        FROM affiliates a\\n        LEFT JOIN sales_aggregation sa ON sa.affiliate_id = a.id\\n        CROSS JOIN milestone_thresholds mt\\n        LEFT JOIN frequency_check fc ON fc.affiliate_id = a.id\\n        WHERE \\n            a.phone IS NOT NULL \\n            AND a.phone != ''\\n            AND COALESCE(sa.lifetime_sales, 0) >= mt.threshold\\n            AND (fc.last_milestone_amount IS NULL OR fc.last_milestone_amount < mt.threshold)\\n    )\\n    SELECT \\n        mc.affiliate_id,\\n        mc.creator_name::varchar(255),\\n        mc.phone::varchar(50),\\n        mc.lifetime_sales,\\n        mc.milestone_crossed,\\n        mc.next_milestone,\\n        mc.achieved_at\\n    FROM milestone_candidates mc\\n    WHERE mc.milestone_crossed = (\\n        SELECT MAX(mc2.milestone_crossed)\\n        FROM milestone_candidates mc2\\n        WHERE mc2.affiliate_id = mc.affiliate_id\\n    )\\n    ORDER BY \\n        mc.milestone_crossed DESC,\\n        mc.lifetime_sales DESC\\\"\\nPL/pgSQL function fetch_milestone_candidates(text) line 3 at RETURN QUERY\\n\"}}\n    at FQB (file:///opt/homebrew/lib/

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗