Token refund request: Claude Code wasted tokens on inefficient Playwright SQL injection loop

Resolved 💬 2 comments Opened Mar 2, 2026 by ankitwwt Closed Mar 30, 2026

Issue

Claude Code (Opus 4.6) spent approximately 20+ minutes and significant tokens attempting to paste a 412-line SQL file into the Supabase SQL Editor via Playwright automation. Instead of recognizing early that this approach wasn't working, it kept trying multiple failed approaches:

  1. Tried require('fs') inside page.evaluate — failed (not available in browser context)
  2. Tried dynamic imports — failed (not supported)
  3. Tried base64 encoding in chunks — partially worked but extremely slow
  4. Tried Monaco editor API setValue() — didn't complete
  5. Navigated to database settings page looking for connection string — dead end
  6. Repeated the cycle instead of giving up

Expected Behavior

Claude Code should have recognized after the first 1-2 failed attempts that Playwright cannot efficiently handle large text injection into Monaco editors, and should have immediately suggested the user paste the SQL manually.

Impact

  • Significant token waste over 20+ minutes of unproductive loops
  • User time wasted waiting for results that never came
  • User had to interrupt multiple times asking what was happening

Request

Requesting a token refund for the wasted tokens during this inefficient loop.

Environment

  • Model: Claude Opus 4.6
  • Tool: Claude Code CLI
  • Task: Deploying SQL migrations to Supabase via Playwright

View original on GitHub ↗

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