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 whoamiandbird search 'OpenClaw'both fail withfetch failed, andagent-reach search-twitterreturns 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
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 readHTTP_PROXY/HTTPS_PROXYenvironment variables. Your proxy athttp://127.0.0.1:7890was therefore never used by bird, so every Twitter request ended infetch failed.To get the fix, upgrade agent-reach from GitHub main:
bashpip install --upgrade https://github.com/Panniantong/agent-reach/archive/main.zipThen, per the maintainer's instructions:
bashnpm 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 doctornow 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 setGLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:7890andNODE_OPTIONS=--require global-agent/bootstrapbefore running bird.
No user in the thread has yet confirmed whether the upgrade worked, so test after upgrading.
General advice:
AUTH_TOKENandCT0are Twitter session cookies — treat them as secrets and avoid logging them or committing them to config files.Did this work for you?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 withagent-reach configure proxy http://127.0.0.1:7890, then test withagent-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?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?What @Panniantong tried on GitHub (Outcome unclear)
Advanced workaround:
npm install -g global-agent, setGLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:7890andNODE_OPTIONS=--require global-agent/bootstrap, then runbird search "test".Source: https://github.com/Panniantong/Agent-Reach/issues/9#issuecomment-3961854010 (opens external site)
Did this work for you?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?
Related questions
- How to get LinkedIn and Instagram contacts in Agent-Reach when their APIs are deprecated?
- agent-reach Instagram cookies fail: redirected to login / 'Something went wrong'?
- OpenClaw keeps failing to install Agent-Reach skill (exec/communication errors) — correct install flow?
- Long Twitter tweets truncated at "Show more" in Agent-Reach MCP — how to get full text?
- agent-reach read: 'invalid choice: read' error — how to actually read a URL?