Keep machine-specific agent config out of the repository - #73
Conversation
`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
There was a problem hiding this comment.
💡 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".
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
|
Both right, and the second one showed the ignore was covering for the real problem rather than fixing it. Shared Claude settings. 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 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 |
Running
continuum installin this repository produced three untracked config files, and all of them embed the absolute path of whoever ran it:The same path appears in
.gemini/settings.jsonand 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.jsonand the scheduled-tasks lock file..claude/skills/continuum/SKILL.mdis 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 installcould 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 toinstall, so it belongs in its own PR rather than being folded into an ignore rule.