Part 3 of the "Automating Playwright with Claude Code" series. Catch up on Part 1: Getting Started with Claude Code and Playwright CLI and Part 2: Playwright CLI vs MCP if you missed them.

In Part 2, we saw nearly a 90,000-token gap between Playwright MCP and Playwright CLI on the exact same test. But tool choice is only one lever. Once you're running longer test-writing sessions with Claude Code — building out a whole regression suite, not just one test — a handful of everyday habits make just as much difference to your token bill and your context window. This post covers the ones that consistently pay off.

Why Token Usage Matters for Test Automation

Long sessions hit context limits. A regression suite with 15+ forms to test can genuinely exhaust a session if every step re-sends unnecessary state.

Cost scales with usage. If you're on API pricing rather than a flat subscription, token-heavy sessions translate directly into a bigger bill.