Skip to content

fix(installer): instructions block conditional on .codegraph/ — safe in user-scope files - #820

Merged
colbymchenry merged 1 commit into
mainfrom
fix/conditional-instructions-block
Jun 12, 2026
Merged

fix(installer): instructions block conditional on .codegraph/ — safe in user-scope files#820
colbymchenry merged 1 commit into
mainfrom
fix/conditional-instructions-block

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

Summary

Follow-up to #819. The instructions block opened with "This repository is indexed by CodeGraph" — true for project-local installs, false when a global install writes it into user-scope files (~/.claude/CLAUDE.md, ~/.codex/AGENTS.md, ~/.gemini/GEMINI.md, ~/.config/opencode/AGENTS.md), where it applies to every repo the user opens. In unindexed repos that claim would push subagents into failing codegraph calls — the exact noise the unindexed-session policy (#817) exists to prevent.

The block is now scope-neutral: "In repositories indexed by CodeGraph (a .codegraph/ directory exists at the repo root) …", with an explicit "if there is no .codegraph/, skip CodeGraph entirely — indexing is the user's decision" closer, consistent with the stay-quiet policy everywhere else.

Same [Unreleased] feature as #819 — no separate changelog entry. Contract tests: 137/137 (substring assertions unaffected).

Residual risk, stated honestly: the delegation A/B validated the assertive project-scoped wording (4/4 subagent adoption); the conditional form keeps the same active ingredients. Fold a re-check into the next delegation A/B.

🤖 Generated with Claude Code

….codegraph/ existing

A global install writes the block into user-scope files
(~/.claude/CLAUDE.md, ~/.codex/AGENTS.md) that apply to EVERY repo the
user opens — the unconditional "This repository is indexed" claim was
false in unindexed ones and would send subagents into failing codegraph
calls, the exact noise the unindexed-session policy (#817) eliminates.
Now: "In repositories indexed by CodeGraph (a .codegraph/ directory
exists) …" plus an explicit skip-entirely line for the no-index case.

Residual: the delegation A/B validated the assertive project-scoped
wording; the conditional form keeps the same active ingredients (the
codegraph name + both command surfaces in the relay-able slot) — fold a
re-check into the next delegation A/B run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@colbymchenry
colbymchenry merged commit e2f1fe4 into main Jun 12, 2026
@colbymchenry
colbymchenry deleted the fix/conditional-instructions-block branch June 12, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant