Repository navigation
refactor: make infer config userspace-first - #682
Merged
Merged
Conversation
Closed
6 tasks
edenreich
marked this pull request as ready for review
June 29, 2026 07:55
edenreich
reviewed
Jun 29, 2026
edenreich
reviewed
Jun 29, 2026
edenreich
reviewed
Jun 29, 2026
Co-authored-by: Eden Reich <[email protected]>
5 tasks
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Jun 30, 2026
## [0.126.0](v0.125.0...v0.126.0) (2026-06-30) ### 🚀 Features * add persistent memory tool for agent ([#679](#679)) ([a487b13](a487b13)) * **agent:** interactive subagent management and unified background-work tracking ([#684](#684)) ([343e083](343e083)) ### 🐛 Bug Fixes * **chat:** bind opt+backspace and ctrl+backspace to delete-word-backward ([#697](#697)) ([173fe83](173fe83)), closes [#689](#689) [#576](#576) * **a2a:** retain completed background tasks in /tasks ([#691](#691)) ([#701](#701)) ([43b8e13](43b8e13)) * **autocomplete:** surface arguments for one-of/all-optional tool schemas ([#698](#698)) ([655b2e4](655b2e4)) ### ♻️ Code Refactoring * add .gitignore by default to the projects dir ([4717deb](4717deb)) * enable memory by default ([86c2158](86c2158)) * make infer config userspace-first ([#682](#682)) ([1e77e42](1e77e42)), closes [#680](#680) * **tui:** single event-loop ingress - one notifier, no self-rescheduling pollers ([#700](#700)) ([2ab8854](2ab8854)) * standardize comment punctuation by replacing em dashes with hyphens ([78f53a8](78f53a8)) ### 📚 Documentation * fix docs/ drift found by the README-to-codebase audit ([#687](#687)) ([413047a](413047a)), closes [#572](#572) [#686](#686) * sync README and reference docs with the codebase ([#685](#685)) ([c328423](c328423)), closes [#572](#572) [#684](#684) [#684](#684) ### 👷 CI/CD * **deps:** update CLAUDE workflow to version 0.14.5 ([eaba2b3](eaba2b3)) ### 🧹 Maintenance * add .infer to .gitignore ([08ef319](08ef319)) * **deps:** bump infer CLI v0.124.0 -> v0.125.0, infer-action v0.19.0 -> v0.19.1 ([#681](#681)) ([e9e7e21](e9e7e21)) * remove agent definitions ([4f7fd7d](4f7fd7d)) * remove unused configuration and shortcut files ([4c611db](4c611db)) * update claude-code to 2.1.191 ([729e81c](729e81c))
Contributor
|
🎉 This PR is included in version 0.126.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Flip
inferconfiguration to a userspace-first model.infer initnow seeds the fullconfiguration baseline to
~/.infer/so it is shared across every project, and a project's./.infer/carries only the settings it overrides. A projectconfig.yamlis merged ontothe home one key-by-key, so a repo commits just its genuine overrides and inherits everything
else from the userspace baseline.
Resolves #680.
Motivation
Previously
infer initwrote the full config set into each project's./.infer/, so everyrepo duplicated configuration that is really the same across all of a user's projects
(keybindings, prompts, gateway/model defaults, ...). Now you set up once in
~/.infer/and reuseit everywhere; a project commits only what it genuinely changes.
Behavior changes
infer inittarget./.infer/(full set)~/.infer/(full baseline)infer init --project(overrides only)--userspaceflagconfig.yamlresolutionconfig setdefault target--projectwrites a sparse overrideThe same
--userspace->--projectflip applies to theconfig,keybindings,mcp, andagentscommands.What's in this PR
infer initscope (cmd/init.go)--userspace, add--project. The default now seeds the full baseline to~/.infer/;--projectseeds only the project-overridable files into./.infer/as a sparse scaffold.always seeded to
~/.infer/and created only-if-absent (newcreateFileIfAbsent/fileExistshelpers), so a later
--projectinit never clobbers them, and the "Created:" output only listsfiles that were actually written.
.env.exampleis now project-only scaffolding (createProjectEnvExample).createSparseConfigScaffoldwrites a minimal, commented projectconfig.yaml.Layered config merge (
cmd/root.go)loadLayeredConfigreads~/.infer/config.yamlas the base layer, thenMergeInConfigsthe project
./.infer/config.yaml(or./config.yaml) on top. Net precedence:defaults < home < project < flags < env. A project that omitsconfig.yamlinherits homewholesale, and a single file is never merged onto itself.
Sparse writes (
cmd/config_getset.go,internal/utils/config.go)config setwrites to~/.infer/by default;--projectwrites a sparse override (onlythe changed key) into
./.infer/via the newWriteViperConfigSparse. Both files stay sparse,so the merged/effective config is never written back.
Remove the sandbox-merge workaround (
cmd/config.go,config/config.go)mergeGlobalSandboxDirs/Config.MergeSandboxDirectorieshack obsolete; both are removed, along with
config/sandbox_merge_test.go.Flag rename (
cmd/config.go,cmd/keybindings.go,cmd/mcp.go,cmd/agents.go)--userspace->--project(GetUserspaceFlag->GetProjectFlag), inverting the default sowrites target the home baseline unless
--projectis passed.Web auto-init callers (
internal/web/pty_manager.go,internal/web/remote_installer.go)infer init --userspace-> plaininfer init.Tests
cmd/init_test.gofor the default-home /--projectbehavior; addedcmd/userspace_first_test.gocovering the home+project merge and the sparseconfig set --projectwrite; removed the obsolete
config/sandbox_merge_test.go.Breaking changes
--userspaceflag is removed frominit,config,keybindings,mcp, andagents.~/.infer/is now the default write target; use--projectfor project-scoped writes.infer initwith no flags now writes to~/.infer/instead of./.infer/.Not included / follow-up
README.md,docs/directory-structure.md,docs/commands-reference.md,docs/configuration-reference.md, and the per-file scope table)are not part of this PR and should follow in a separate change.