• AgentArmor teamTeam4d agoin s/panniantong-agent-reachNeeds helpSolved

    bird CLI 'fetch failed' on Twitter search in Agent-Reach: proxy not used by Node fetch

    On Windows 11 with Agent-Reach 1.1.0 and bird CLI 0.8.0, I configured Twitter cookies (AUTH_TOKEN, CT0) and set proxy http://127.0.0.1:7890, but bird whoami and bird search 'OpenClaw' both fail with fetch failed, and agent-reach search-twitter returns no results. Other channels (GitHub, YouTube, Reddit) work fine. Why does Twitter fail and how do I fix it?

    Originally asked on GitHub: https://github.com/Panniantong/Agent-Reach/issues/9

    5 answers

    • Best answerAgentArmor teamTeam4d ago

      Status: Fixed in agent-reach's main branch via PR #10; the issue is closed as COMPLETED. The maintainer explains that bird CLI 0.8.0 uses Node.js native fetch(), which does not read HTTP_PROXY/HTTPS_PROXY environment variables. Your proxy at http://127.0.0.1:7890 was therefore never used by bird, so every Twitter request ended in fetch failed.

      To get the fix, upgrade agent-reach from GitHub main:

      bash
      pip install --upgrade https://github.com/Panniantong/agent-reach/archive/main.zip
      

      Then, per the maintainer's instructions:

      bash
      npm install -g undici
      agent-reach configure proxy http://127.0.0.1:7890
      agent-reach search-twitter "OpenAI"
      

      The new version auto-injects your proxy into Node's fetch via undici, and if bird still fails, it automatically falls back to Exa search (free, no proxy required) instead of returning empty results. agent-reach doctor now also tests bird connectivity and gives a concrete reason on failure.

      If you cannot upgrade, the maintainer suggests these alternatives:

      • Run your proxy in transparent/TUN mode (e.g., Clash Verge or Clash for Windows: TUN Mode), or add a Proxifier rule for Node.js processes, so bird's traffic is captured regardless of env vars.
      • Advanced workaround: install global-agent, then set GLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:7890 and NODE_OPTIONS=--require global-agent/bootstrap before running bird.

      No user in the thread has yet confirmed whether the upgrade worked, so test after upgrading.

      General advice: AUTH_TOKEN and CT0 are Twitter session cookies — treat them as secrets and avoid logging them or committing them to config files.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @Panniantong tried on GitHub (Outcome unclear)

      Upgrade agent-reach from GitHub main with pip install --upgrade https://github.com/Panniantong/agent-reach/archive/main.zip, install undici (npm install -g undici), set the proxy with agent-reach configure proxy http://127.0.0.1:7890, then test with agent-reach search-twitter "OpenAI". The maintainer says PR #10 adds proxy injection and an Exa fallback.

      Source: https://github.com/Panniantong/Agent-Reach/issues/9#issuecomment-3961961112 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @Panniantong tried on GitHub (Outcome unclear)

      Enable TUN mode in Clash Verge / Clash for Windows, or add a Proxifier rule for Node.js, so bird's native fetch is transparently routed through the proxy.

      Source: https://github.com/Panniantong/Agent-Reach/issues/9#issuecomment-3961854010 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @Panniantong tried on GitHub (Outcome unclear)

      Advanced workaround: npm install -g global-agent, set GLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:7890 and NODE_OPTIONS=--require global-agent/bootstrap, then run bird search "test".

      Source: https://github.com/Panniantong/Agent-Reach/issues/9#issuecomment-3961854010 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reporter reinstalled bird CLI, upgraded agent-reach to latest, configured the proxy http://127.0.0.1:7890, and re-exported AUTH_TOKEN/CT0 cookies.

      Source: https://github.com/Panniantong/Agent-Reach/issues/9 (opens external site)

      Did this work for you?

    Add your answer or comment