Skip to content

Keep machine-specific agent config out of the repository - #73

Merged
00PrabalK00 merged 2 commits into
mainfrom
chore/agent-config-hygiene
Aug 4, 2026
Merged

Keep machine-specific agent config out of the repository#73
00PrabalK00 merged 2 commits into
mainfrom
chore/agent-config-hygiene

Conversation

@00PrabalK00

Copy link
Copy Markdown
Owner

Running continuum install in this repository produced three untracked config files, and all of them embed the absolute path of whoever ran it:

# .codex/config.toml
args = ["mcp", "serve", "--project", "C:/Users/Prabal/continuum"]

The same path appears in .gemini/settings.json and in the hook commands in .claude/settings.json. Committing any of them breaks the next person who clones, and puts a home directory into a public repository.

They are ignored now, along with .claude/settings.local.json and the scheduled-tasks lock file.

.claude/skills/continuum/SKILL.md is committed instead of ignored: it contains no paths and describes the project rather than the machine, so it is useful to anyone who clones.

Worth considering separately

This is a gitignore fix, not a fix to the underlying behaviour. continuum install could write a relative path, since every one of those agents runs with the project as its working directory, and the plugin manifest already uses ${CLAUDE_PROJECT_DIR} rather than an absolute path. That would make the generated config committable and shareable across a team. It is a behaviour change to install, so it belongs in its own PR rather than being folded into an ignore rule.

`continuum install` writes the absolute project path into the config it
generates:

    args = ["mcp", "serve", "--project", "C:/Users/Prabal/continuum"]

That appears in .codex/config.toml, .gemini/settings.json and the hook
commands in .claude/settings.json. Committing any of them breaks the next
person who clones, and puts a home directory in a public repository.

They are ignored, alongside the local Claude Code settings and lock file.
The generated skill is committed, because it contains no paths and
describes the project rather than the machine.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5AfgnF6gZnJxdMEfGrEPc

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f396a193e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .gitignore Outdated
Comment thread .gitignore Outdated
Review pointed out that the ignore rules were wider than the generated
files, and that ignoring .claude/settings.json suppresses shared team
configuration. Both are right, and the second one showed the ignore was
covering for the real problem rather than fixing it.

.claude/settings.json is configuration Continuum merges into rather than
owns, so an absolute path baked into it either breaks every other clone
or forces the whole file out of version control. The hooks reference
Claude Code's own ${CLAUDE_PROJECT_DIR} instead, which makes the file
machine-independent, so it is committed rather than ignored and anyone
cloning gets the hooks.

The remaining rules name the generated files rather than their
directories, so anything else a contributor puts in .codex/ or .gemini/
stays trackable.

Those two still carry an absolute path, since neither documents a
project-directory variable. They are ignored for that reason, which is
now a statement about those two files rather than a blanket over three
directories.

Verified by reinstalling and regenerating: the written hook reads
`--project "${CLAUDE_PROJECT_DIR}"` and the file contains no path. A test
asserts the hook commands never contain the project path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5AfgnF6gZnJxdMEfGrEPc
@00PrabalK00

Copy link
Copy Markdown
Owner Author

Both right, and the second one showed the ignore was covering for the real problem rather than fixing it.

Shared Claude settings. .claude/settings.json is configuration Continuum merges into rather than owns, exactly as you say, so hiding the whole file to contain one machine-specific string was the wrong trade. The hooks now reference ${CLAUDE_PROJECT_DIR}, which Claude Code resolves itself:

continuum hook session-start --project "${CLAUDE_PROJECT_DIR}"

The file is machine-independent, so it is committed rather than ignored, and anyone cloning gets the hooks. Verified by reinstalling and regenerating rather than by reasoning about it: the written file contains no path at all.

Directory-wide ignores. Narrowed to .codex/config.toml and .gemini/settings.json, so anything else a contributor puts in those directories stays trackable.

Those two still carry an absolute path, because neither Codex nor Gemini documents a project-directory variable I can rely on the way Claude Code does. So they stay ignored, but that is now a statement about two generated files rather than a blanket over three directories. If either grows a portable form later, the same fix applies and the ignore can go.

One test added: the hook commands must contain ${CLAUDE_PROJECT_DIR} and must not contain the project path. 751 in the suite.

@00PrabalK00
00PrabalK00 merged commit df14285 into main Aug 4, 2026
12 checks passed
@00PrabalK00
00PrabalK00 deleted the chore/agent-config-hygiene branch August 4, 2026 14:46
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