Wrangler version
4.123.0
Environment
- Wrangler invoked by OpenAI Codex, with
CODEX_THREAD_ID present
Description
When Wrangler runs inside OpenAI Codex, an otherwise local command contacts the GitHub API:
https://api.github.com/repos/cloudflare/skills/contents/skills
https://api.github.com/repos/cloudflare/skills/contents/
This happens while running:
The connection is not made when I run the same command directly from my interactive shell outside Codex. The unexpected request repeatedly triggers an application-firewall prompt.
Setting these opt-outs does not appear sufficient to prevent the lookup:
WRANGLER_SEND_METRICS=false
WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true
Steps to reproduce
- Run Wrangler from an environment containing
CODEX_THREAD_ID, such as an OpenAI Codex command session.
- Set
WRANGLER_SEND_METRICS=false and WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true.
- Run
wrangler types --check while observing outbound connections.
- Observe a Node.js connection to
api.github.com.
- Run the same command outside Codex, without
CODEX_THREAD_ID, and observe that this GitHub request is absent.
Expected behavior
- When
WRANGLER_SEND_METRICS=false, Wrangler should not make network requests whose purpose is enriching telemetry.
- When
WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true, ordinary Wrangler commands should not query the Cloudflare skills repository unless the user explicitly requests a skills operation.
wrangler types --check should not gain unrelated network behavior merely because it detects an AI coding agent.
Actual behavior
Wrangler detects Codex through CODEX_THREAD_ID and queries the public cloudflare/skills repository through the GitHub API.
Inspection of the Wrangler 4.123.0 bundle indicates the following sequence:
detectAgent() identifies Codex from CODEX_THREAD_ID.
telemetryCurrentAgentSkillsInstalled() calls computeTelemetryCurrentAgentSkillsInstalled().
- That function calls
fetchSkillNamesFromGitHub() to determine whether Cloudflare skills are installed.
- The resulting promise is created before the metrics dispatcher checks
metricsConfig.enabled.
Consequently, disabling telemetry prevents the final telemetry POST but does not prevent the preliminary GitHub request used to populate the telemetry property. The skill-prompt opt-out controls the prompt/update flow but not this telemetry-side lookup.
The GitHub requests use Wrangler's static headers, including User-Agent: cloudflare-wrangler; they do not appear to use GitHub CLI credentials.
Workaround
Removing the Codex detection variable only from the Wrangler child process avoids this lookup:
env -u CODEX_THREAD_ID wrangler types --check
Suggested fix
Avoid computing telemetryCurrentAgentSkillsInstalled() when telemetry is disabled. The skills lookup should also honor WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true, or use a separate explicit opt-in if it is needed independently of telemetry and skill prompts.
Wrangler version
4.123.0Environment
CODEX_THREAD_IDpresentDescription
When Wrangler runs inside OpenAI Codex, an otherwise local command contacts the GitHub API:
This happens while running:
The connection is not made when I run the same command directly from my interactive shell outside Codex. The unexpected request repeatedly triggers an application-firewall prompt.
Setting these opt-outs does not appear sufficient to prevent the lookup:
Steps to reproduce
CODEX_THREAD_ID, such as an OpenAI Codex command session.WRANGLER_SEND_METRICS=falseandWRANGLER_NO_SKILLS_UPDATE_PROMPTS=true.wrangler types --checkwhile observing outbound connections.api.github.com.CODEX_THREAD_ID, and observe that this GitHub request is absent.Expected behavior
WRANGLER_SEND_METRICS=false, Wrangler should not make network requests whose purpose is enriching telemetry.WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true, ordinary Wrangler commands should not query the Cloudflare skills repository unless the user explicitly requests a skills operation.wrangler types --checkshould not gain unrelated network behavior merely because it detects an AI coding agent.Actual behavior
Wrangler detects Codex through
CODEX_THREAD_IDand queries the publiccloudflare/skillsrepository through the GitHub API.Inspection of the Wrangler 4.123.0 bundle indicates the following sequence:
detectAgent()identifies Codex fromCODEX_THREAD_ID.telemetryCurrentAgentSkillsInstalled()callscomputeTelemetryCurrentAgentSkillsInstalled().fetchSkillNamesFromGitHub()to determine whether Cloudflare skills are installed.metricsConfig.enabled.Consequently, disabling telemetry prevents the final telemetry POST but does not prevent the preliminary GitHub request used to populate the telemetry property. The skill-prompt opt-out controls the prompt/update flow but not this telemetry-side lookup.
The GitHub requests use Wrangler's static headers, including
User-Agent: cloudflare-wrangler; they do not appear to use GitHub CLI credentials.Workaround
Removing the Codex detection variable only from the Wrangler child process avoids this lookup:
Suggested fix
Avoid computing
telemetryCurrentAgentSkillsInstalled()when telemetry is disabled. The skills lookup should also honorWRANGLER_NO_SKILLS_UPDATE_PROMPTS=true, or use a separate explicit opt-in if it is needed independently of telemetry and skill prompts.