Repository navigation
Description
Summary
Conversation storage currently defaults to the project directory: the default config sets storage.jsonl.path: .infer/conversations and storage.sqlite.path: .infer/conversations.db (config/config.go ~L1147-1155), and absPath() in internal/platform/storage/factory.go resolves those relative paths against the current working directory. So every project accumulates its own conversation store, and config/gitignore.go has to ship .infer/.gitignore entries (conversations, conversations.db*) just to keep them out of git.
Refactor: conversations and sessions live in the home dir by default, grouped per project - the project-dir default and everything supporting it is deleted. No backward compatibility, no migration of existing project-dir stores.
Proposed design
- New default layout (jsonl backend, the default):
~/.infer/projects/<project-slug>/conversations/<id>.jsonl
where<project-slug>is the absolute project path with path separators replaced (same scheme Claude Code uses, e.g./home/alice/repo->-home-alice-repo). The slug is derived from the CWD at startup. - SQLite default moves to a single shared DB:
~/.infer/conversations.db. Grouping by project happens via a newprojectcolumn/metadata field instead of per-project files. ConversationMetadata(internal/conversation/domain/conversation.go) gains aProject stringfield (absolute path) so listing can be scoped; server backends (postgres/redis/d1) group by this field, not by path.ListConversationsand the TUI conversation picker scope to the current project by default;infer conversations listgets an--all-projectsflag (or similar) for the global view.- Plans already live in
~/.infer/plans(userPlansDir()infactory.go) - fold that into the same per-project layout or leave as-is, implementer's call, but note it in the PR.
What gets deleted (no backward compat)
- The
.infer/conversations/.infer/conversations.dbproject-dir defaults and the CWD-relativeabsPath()resolution for storage paths infactory.go. - The
conversationsandconversations.db*entries inconfig/gitignore.go(nothing conversation-related is written to the project dir anymore). - Any code or docs that read/expect the project-dir location (README storage sections,
docs/). Existing project-dir stores are simply orphaned - users can delete them manually.
Notes / gotchas
- An explicit user-set
storage.jsonl.path/storage.sqlite.pathin config must still win over the new default;expandHome()injsonl.goalready supports~paths. - The sandbox protected-path tests already deny writes to
~/.infer/conversations.db(config/config_test.go~L954); verify the new default locations are covered by the same protection so the agent cannot edit its own history. conversationFilePath()injsonl.gosanitizes IDs against path traversal; the project-slug component needs the same treatment.- Headless/scheduler runs also create conversations - they must resolve the same project slug as interactive runs in the same CWD.
Acceptance Criteria
- Fresh run with no config stores conversations under
~/.infer/projects/<project-slug>/conversations/(jsonl) or~/.infer/conversations.db(sqlite); nothing conversation-related is written to the project dir. - Conversations/sessions record their project and the TUI picker plus
infer conversations listshow only the current project's conversations by default, with a flag for all projects. - Project-dir defaults,
.infer/.gitignoreconversation entries, and all related dead code/docs are removed - no migration or fallback reads of the old location. - Explicit
storage.*.pathconfig values are still honored;task precommit:runpasses.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
[-][TASK] Default all conversations to go to the home dir not the project dir[/-][+][TASK] Store conversations in the home dir, grouped by project[/+]edenreich commentedon Aug 30, 2026
@infer Can you work on this? use /go /go-concurrency /ponytail:ponytail
inference-gateway-maintainer commentedon Aug 30, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1128
The agent hit the job's time limit before finishing, so it was stopped to salvage its work. Its committed changes were pushed; the draft pull request is linked above.
I am out of context - committing and pushing now so nothing is lost, then opening the draft PR.
Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 24m 4sTokens: 34,024,181 in · 70,227 out · 34,094,408 total (89 requests)
Tool calls: 152 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
fix: resolve #1122
docs: update storage locations and schema for per-project conversatio…
feat: store conversations in the home dir, grouped by project (#1122) (…
refactor(runtime): default runtime artifacts to ~/.infer/projects/<slug>
refactor(runtime): default runtime artifacts to ~/.infer/projects/<sl…
inference-gateway-releaser commentedon Aug 30, 2026
🎉 This issue has been resolved in version 0.185.0 🎉
The release is available on:
Your semantic-release bot 📦🚀