Troubleshooting
Common issues and fixes.
Install
claude: command not found when using claude-code provider
Install the Claude Code CLI:
npm install -g @anthropic-ai/claude-code
Or switch to Anthropic direct in nitpick.yaml:
llm:
provider: anthropic
ANTHROPIC_API_KEY not set
Either export it:
export ANTHROPIC_API_KEY=sk-ant-...
Or add it to .env in the current directory:
echo"ANTHROPIC_API_KEY=sk-ant-..." >> .env
Crawler
Auth fails
Most likely: your login form doesn’t match the default selectors (input[type=email], input[type=password], button with text”sign in”/“log in”/“login”/“continue”), or the login URL in your config is wrong.
Diagnose:
NITPICK_LOG_LEVEL=debug nitpick crawl
Watch for a WARN log of the form Crawling as role failed — since v0.1.3 per-role auth errors are surfaced instead of silently swallowed.
Workarounds, in order of effort:
- Remove
login_urlfrom your role. For SPAs that auto-redirect or show a login modal on the base URL, leavinglogin_urlunset lets the crawler land onbase_urland wait for a password field to appear anywhere. - Pre-populate
knowledge-base/auth/<role>.jsonusing a manual Playwright script and skip the crawler’s auth entirely. - Wait for the pluggable auth hook system (planned for a future release).
Crawler finds 0 pages
Check in order:
- Auth actually succeeded?
knowledge-base/auth/<role>.jsonmust exist AND have non-emptycookiesororigins. A file with{"cookies": [], "origins": []}means the SPA wrote its session after the crawler snapshotted — re-crawl with v0.1.3+ which waits fornetworkidle+ revisits the base URL before saving state. - Base URL correct?
curl -I $BASE_URLshould return something sensible. - App has navigation?
<nav>,<aside>, or elements withrole="link",role="menuitem". - App uses client-side routing? Nitpick’s SPA mode handles most cases, but not all.
Fallback: specify pages directly, which skips crawler discovery:
nitpick run --scope targeted --url /dashboard --url /tasks
Agent execution
Page test hits max iterations
Default is 100. Indicates the agent is confused about the page or the skill’s phase enforcement isn’t working.
Options:
- Lower the limit to fail fast and save money:
llm:
max_iterations: 30
-
Look at
runs/<id>/pages/<page_id>/agent-trace.jsonl: what is the agent repeatedly doing? -
Improve the terminal guard list, if the agent is re-opening modals or navigating away accidentally.
Test generation seems flat / missing fields
The Derived UI Model is incomplete. Re-run with exploration-only:
rm -rf runs/<run_id>/pages/<page_id>/
nitpick run --scope targeted --url <page>
Then inspect runs/<new_id>/pages/<page_id>/derived-ui-model/*.model.json.
Providers
Anthropic: 429 rate limit
Nitpick retries automatically (5 attempts, exponential backoff). If you still hit the cap, reduce parallelism:
testing:
parallel_workers:"25%"
Or upgrade your Anthropic tier.
OpenAI: context_length_exceeded
Your system prompt + messages exceed the model’s context. Workarounds:
- Switch to
gpt-4o(128k context) instead ofgpt-4-turbo - Lower
max_iterations - Wait for KB-informed prompt trimming (planned for a future release)
Claude Code provider: claude exited with code 1
Check runs/<id>/pages/<page_id>/claude-stderr.log. Usually a missing skill or a Claude Code update that changed the CLI interface.
Reports
Report shows”0 tests”
Either:
- Tests were generated but didn’t run (Playwright failed to launch, check
test-results/stderr.log) - The derived model has no
fields[]oractions[]: exploration didn’t cover this page
HTML report doesn’t open
It’s a self-contained file. open runs/<id>/reports/unified-report.html on macOS, xdg-open on Linux, or drag into a browser.
Cost
My bill is higher than expected
Most likely causes (in order):
- max_iterations too high: an agent spiraled. Set to 30-50 for CI.
- Caching not active: check logs for”cache_read: 0” on iteration 2+. Verify your model supports caching.
- Using Opus for everything: switch
fast_modelto Haiku, and consider Sonnet for main runs. - Full scope too often: use
iterativedaily,fullweekly.
See Cost management for deeper controls.
Still stuck
File a GitHub issue with:
- Your
nitpick.yaml(redacted) - The output of
NITPICK_LOG_LEVEL=debug nitpick <command> - What you expected vs what happened