Skip to content

Troubleshooting

Solutions to common problems when using youBencha.

Error: yb: command not found

Solutions:

  1. Install globally:

    Terminal window
    npm install -g youbencha
  2. Check npm global bin path:

    Terminal window
    npm bin -g
    # Add to PATH if needed
  3. Use npx if installed locally:

    Terminal window
    npx yb --version
Error: Node.js 20+ required

Solution:

Terminal window
# Check version
node --version
# Install Node.js 20+ using nvm
nvm install 20
nvm use 20
Error: YAML parse error at line 5

Common causes:

  1. Tabs instead of spaces:

    # ❌ Wrong (tabs)
    agent:
    type: copilot-cli
    # ✅ Correct (spaces)
    agent:
    type: copilot-cli
  2. Missing colons:

    # ❌ Wrong
    agent
    type: copilot-cli
    # ✅ Correct
    agent:
    type: copilot-cli
  3. Improper quoting:

    # ❌ Wrong
    prompt: Add "quotes" here
    # ✅ Correct
    prompt: 'Add "quotes" here'
Error: Unexpected token in JSON

Common causes:

  1. Trailing commas:

    // ❌ Wrong
    { "key": "value", }
    // ✅ Correct
    { "key": "value" }
  2. Single quotes:

    // ❌ Wrong
    { 'key': 'value' }
    // ✅ Correct
    { "key": "value" }
Error: Invalid evaluator type 'unknown-eval'

Solution:

List available evaluators:

Terminal window
yb list

Use valid evaluator names: git-diff, expected-diff, agentic-judge

Error: Prompt file not found: ./prompts/task.md

Solutions:

  1. Check file path relative to suite.yaml
  2. Create the missing file
  3. Verify file permissions
Error: Copilot CLI not installed

Solution:

Terminal window
npm install -g @githubnext/github-copilot-cli
Error: GitHub authentication required

Solution:

Terminal window
gh auth login
gh auth status # Verify
Error: GitHub Copilot subscription required

Solution:

  1. Verify subscription at github.com/settings/copilot
  2. Ensure token has copilot scope
Error: Model 'xyz' not available

Solutions:

  1. Check supported models in Model Selection
  2. Verify subscription tier supports the model
  3. Use a different model:
    agent:
    model: claude-sonnet-4.5
Error: expected_source and expected required for expected-diff

Solution:

Add reference configuration:

expected_source: branch
expected: feature/completed
evaluators:
- name: expected-diff
Error: Assertion 'quality' produced invalid score

Solutions:

  1. Make assertion text clearer:

    assertions:
    quality: "Code quality is high. Score exactly 0 or 1."
  2. Check agent output in logs

Error: Workspace lock file exists

Solution:

Clean up stale workspace:

Terminal window
rm -rf .youbencha-workspace/run-*
Error: No space left on device

Solutions:

  1. Clean old workspaces:

    Terminal window
    rm -rf .youbencha-workspace/
  2. Use custom workspace location:

    workspace_dir: /tmp/youbencha
Error: Permission denied: .youbencha-workspace

Solution:

Terminal window
chmod -R u+rwx .youbencha-workspace/
Error: Failed to clone repository

Solutions:

  1. Check URL is accessible:

    Terminal window
    git ls-remote https://github.com/org/repo.git
  2. Verify authentication:

    Terminal window
    gh auth status
  3. Check for typos in URL

Warning: Webhook POST failed: Connection refused

Solutions:

  1. Verify webhook URL is correct
  2. Check network connectivity
  3. Ensure endpoint accepts POST requests
Error: Agent execution timed out after 300000ms

Solution:

Increase timeout:

timeout: 600000 # 10 minutes
Error: Pre-execution hook timed out

Solution:

pre_execution:
- name: script
config:
timeout_ms: 120000 # 2 minutes
Terminal window
yb validate -c suite.yaml -v
Terminal window
cat .youbencha-workspace/run-*/artifacts/youbencha.log.json | jq
Terminal window
cat .youbencha-workspace/run-*/artifacts/git-diff.patch
Terminal window
ls -la .youbencha-workspace/run-*/src-modified/
Terminal window
cat .youbencha-workspace/run-*/artifacts/results.json | jq '.summary'

Open an issue on GitHub:

Include:

  • youBencha version (yb --version)
  • Node.js version (node --version)
  • Error message
  • Suite configuration (remove secrets)
  • Steps to reproduce