[BUG] /auto-mode-setup skips cross-project inputs and reports a "just this project" scope the user did not select

Status Open
Reported on v2.1.259
Maintainer reply None cached
Activity 0 comments · opened Sep 3, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet (closest: #87312, which is the storage side — no per-repo key on autoMode.environment. The gather-side defect below appears in that thread only as a comment by another user, never as its own report. Searches for "scan other repos", "shell history scan", and "recent usage across all projects" return nothing.)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

/auto-mode-setup presents this dialog:

  How you use Claude here    ◀ Mixed ▶
  Also scan shell history    [✔]
❯ Also scan your other repos [✔]

with the explanatory line: "Claude Code reads this project, your recent Claude sessions, and optionally your shell history and other repositories."

I ran it with both checkboxes enabled. The resulting proposal nonetheless reported, three separate times, that I had chosen a narrower scope:

· Org repo split (top 50 by pushedAt) NOT GATHERED — user chose just-this-project scope; org posture inferred from repo facts only
· Sibling repo docs NOT GATHERED — user chose just-this-project scope; no sibling docs used
· Recent usage across all projects NOT GATHERED — user chose just-this-project scope

I did not choose "just this project" — that option was not selected, and both scan checkboxes were ticked.

Two of the three skipped inputs are org-scoped ("org repo split", "sibling repo docs"), so on a personal account with no organization there may be genuinely nothing to gather and only the reason string is wrong. The third is not org-scoped. "Recent usage across all projects" is the user's own Claude Code sessions across their own projects, and the dialog lists reading recent sessions as non-optional, not as one of the two opt-in scans. It was skipped anyway, and attributed to a scope choice that was never made.

Evidence that the checkbox reached some code path: the proposal's notes did enumerate other git repositories under the home directory and excluded them deliberately, by a provenance rule ("none share this project's org/remote") rather than by scope. So "scan other repos" partially functioned while the scope was simultaneously reported as just-this-project.

Not directory-dependent. I first hit this in a working directory that is not a git repository, and assumed that was the cause. Re-running from a real, private, gh-confirmed repository with a configured remote produced the identical three notes with the identical wording.

Why this matters beyond the wrong label

Combined with #87312 (facts are written to a single global autoMode.environment array with no per-repo key), the gather and store scopes are mismatched in the worst direction: facts are gathered from one project and then asserted globally for all of them. Either half being fixed would resolve the correctness problem —

  • gather across all projects → the global document becomes globally true
  • key entries per repo → narrow facts stay correctly scoped

— but as it stands, a single run produces one project's facts stated as universal ones, and the classifier reads them in every session.

What Should Happen?

The scope actually selected in the dialog should be honoured, and the NOT GATHERED notes should state the real reason. Specifically:

  1. With "Also scan your other repos" enabled, cross-project inputs should be gathered rather than skipped as "just-this-project scope".
  2. "Recent usage across all projects" should be gathered regardless, since the dialog presents reading recent sessions as non-optional.
  3. Where an input genuinely cannot be gathered (e.g. no organization exists on a personal account), the note should say that, rather than attributing it to a scope the user did not pick. A wrong reason is worse than a missing one — it sends the user looking for a setting they already set correctly.

Steps to Reproduce

  1. Run /auto-mode-setup.
  2. Enable both "Also scan shell history" and "Also scan your other repos". Leave the usage selector at "Mixed".
  3. Read the Notes section of the proposal.
  4. Observe NOT GATHERED — user chose just-this-project scope on inputs including "Recent usage across all projects", despite no such scope having been selected.
  5. Repeat from a different working directory, including one that is a real repository with a remote — the notes are identical.

Error Messages/Logs

None. Nothing fails; the proposal is produced normally with inputs silently skipped.

Claude Model

Opus

Is this a regression?

I don't know — first time running this command.

Last Working Version

Not applicable.

Claude Code Version

2.1.259

Platform

Claude Pro subscription

Operating System

Linux (Ubuntu 24.04)

Additional Information

Independently confirmed by another user in #87312 (comment of 2026-08-25):

I'm also seeing this, it's always scoped to the current project. Even when I enable the "Scan other repos" option, the output still includes: Org repo split (top 50 by pushedAt) was NOT GATHERED — scope is 'just this project', so org-wide posture beyond this repo is inferred only from repo facts.

That observation has lived only as a comment on a storage-focused issue since then, which is why I'm filing the gather side separately.

Related: #87312 (global storage, no per-repo key), #87233 (duplicate/contradictory entries on re-run).

View original on GitHub ↗