Skip to content

Troubleshooting

John Williams edited this page Mar 6, 2026 · 1 revision

Troubleshooting

Common Issues

"No account found matching..."

The resolve_customer_id() function searches for accounts under your MCC.

Fixes:

  • Verify LOGIN_CUSTOMER_ID is the MCC (Manager) account, not a child account
  • Confirm the target account is linked to your MCC
  • Check that the search string matches part of the account's descriptive name
  • Try using the customer ID directly (numbers only, no dashes)

"google-ads package not found"

Fixes:

  • Run pip install -r requirements.txt first
  • Ensure you're in the virtual environment (source venv/bin/activate)
  • For Docker: rebuild with docker compose build

"OAuth credentials expired"

Refresh tokens generally don't expire, but can be revoked if:

  • You changed your Google account password
  • You removed the app's access in Google Security Settings
  • The token hasn't been used in 6+ months
  • Google rotated the token (rare)

Fix: Re-run the refresh token generation from Credentials Setup.

"Developer token not approved"

If your token is in "Test Account" mode:

  • It only works with Google Ads test accounts
  • Apply for Basic Access at Google Ads API Center
  • Approval typically takes 1-3 business days

Token access levels:

Level Operations/Day Req/Second
Test Account Test accounts only
Basic Access 15,000 4
Standard Access Unlimited 100

"Rate limit exceeded"

Google Ads API limits:

  • Basic Access: 15,000 operations/day, 4 requests/second
  • Use costMin, status, and limit params to reduce result sets
  • The Filter-First Architecture helps stay within limits

Buddy rate limits:

  • Brain API: 30 req/min per IP
  • Gads API: 40 req/min per IP

"Sub-agent not responding"

Fixes:

  • Verify the sub-agent is linked in the main agent's sub-agents list
  • Check that Session & State Manager (Action #17) is installed
  • Ensure the sub-agent has its own credentials configured (they don't inherit from main)

OpenAI API: "max_tokens not supported"

GPT-5.2 models require max_completion_tokens instead of max_tokens.

Fix: The Buddy deployment already handles this. If you're using the Python agent, update your API call parameters.

Anthropic API: "Unexpected role 'system'"

The Anthropic Messages API expects system as a top-level parameter, not in the messages array.

Fix: Filter messages to only include user and assistant roles before sending to the API. Pass system instructions via the system parameter.

"CORS error" in browser

Fixes:

  • Verify your origin is in the CORS allowlist
  • Check _middleware.js for the allowed origins
  • For local development, http://localhost:8788 is allowed by default

Debugging Tips

Enable verbose logging

For the Python agent:

import logging
logging.basicConfig(level=logging.DEBUG)

Test a single tool

from deploy import ToolExecutor
executor = ToolExecutor()
result = executor.execute_tool(
    "campaign_adgroup_manager",
    {"action": "list_campaigns", "status_filter": "ENABLED"}
)
print(result)

Validate credentials

python scripts/validate.py --live

The --live flag makes an actual API call to verify credentials work end-to-end.

Check tool signatures

from deploy import ToolExecutor
executor = ToolExecutor()
sig = executor.get_run_signature("campaign_adgroup_manager")
print(sig)  # Shows exact parameters the function accepts

Getting Help

  1. Check the GitHub Discussions
  2. Open an Issue for bugs
  3. See CONTRIBUTING.md for contribution guidelines

Clone this wiki locally