{"version":"2.1.205","anchor":"auto-mode-repo-visibility-lookup","canonical_anchor":"auto-mode-repo-visibility-lookup","heading":"Auto-mode repo visibility lookup","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.205\/e\/auto-mode-repo-visibility-lookup","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.205","markdown":"### Auto-mode repo visibility lookup\n\nWhen the `tengu_auto_mode_config` feature flag has `repoVisibility: true` (or `CLAUDE_CODE_AUTO_MODE_REPO_VISIBILITY` is set), Claude Code now automatically looks up GitHub repo visibility before git push\/remote operations and injects a `{\"meta\":{\"repoVisibility\":...}}` line into the classifier context so the auto-mode security classifier can make better decisions about public vs. private pushes.\n\n**Details**\n\n- Activates when the `CLAUDE_CODE_AUTO_MODE_REPO_VISIBILITY` environment variable is set, or when `tengu_auto_mode_config.repoVisibility === true`; only applies to Bash and GitHub CLI (`gh`) tool calls \u2014 all other tool types are skipped immediately\n- Parses Bash commands for `git push` and `git remote set-url`\/`git remote add` patterns; parses `gh` commands for `pr create` and `repo fork` subcommands to identify target repositories\n- Calls the GitHub REST API (`GET \/repos\/{owner}\/{repo}`, API version 2022-11-28) with a 3-second timeout, no redirects, and the locally cached GitHub token when available; results are cached in-memory per `host\/owner\/repo` key for the process lifetime\n- Visibility values normalised to three states: `\"public\"`, `\"private\"` (GitHub `\"internal\"` repos map to `\"private\"`), or `\"unknown\"` (returned for non-GitHub hosts, essential-traffic-only mode, HTTP\/parse errors, or missing API fields)\n- One `{\"meta\":{\"repoVisibility\":{\"remote\":\"owner\/repo\",\"visibility\":\"...\"}}}` JSON line is prepended to the classifier context for each repository identified in the command; multiple repos in a single command each get their own line\n- The lookup runs concurrently with the classifier API call via `Promise.race` with a deadline; any already-resolved visibility entries are included in the classifier context even if the full lookup has not yet completed\n\n**Evidence**\n\nRepo visibility lookup (search for `\"tengu_auto_mode_repo_visibility_lookup_failed\"`) \u2014 `T0u()` at line ~416404; `yEg()` GitHub API call at line ~415701; `fKi()` JSON format at line ~415951\n\n- Flag `tengu_auto_mode_config`: Not enough to say (read for one account on one subscription tier against v2.1.205; this account: no value returned, anonymous baseline: no value returned, compiled default: not a boolean we can read) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release."}