Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wrangler contacts GitHub for agent-skills telemetry when metrics and skill prompts are disabled #15344

Description

@SeanSanker

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:

wrangler types --check

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

  1. Run Wrangler from an environment containing CODEX_THREAD_ID, such as an OpenAI Codex command session.
  2. Set WRANGLER_SEND_METRICS=false and WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true.
  3. Run wrangler types --check while observing outbound connections.
  4. Observe a Node.js connection to api.github.com.
  5. 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:

  1. detectAgent() identifies Codex from CODEX_THREAD_ID.
  2. telemetryCurrentAgentSkillsInstalled() calls computeTelemetryCurrentAgentSkillsInstalled().
  3. That function calls fetchSkillNamesFromGitHub() to determine whether Cloudflare skills are installed.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions