Skip to content

Feature request: per-repo instance isolation (data_dir, ports, and scoped export) #52

@maxlamagna

Description

@maxlamagna

Summary

This is a request for per-repo instance isolation — the ability to run agentchattr with a separate data_dir, ports, and scoped export for each project/repo.

Currently, the history store (data_dir) is shared across all repos. The repo-specific launcher/profile layer sets per-repo cwd for agents, but does not scope server.data_dir, ports, or the history/export store. This is a storage and isolation boundary problem, not just an export-format issue. The consequence is that /api/export returns all history from all projects, making it unsafe for per-repo disaster recovery or committed portable state.

Current behavior

  • agentchattr-start-server --repo <repo> rewrites agent cwd via profile, but the server's data_dir (typically ~/ai-dotfiles/tools/agentchattr/data) is shared
  • Ports are shared across all repos using the same agentchattr instance
  • /api/export exports all messages, jobs, rules, and summaries across all repos/projects
  • Exported message and job records do not carry repo or workspace metadata
  • Channels help organize discussion within one project, but are not a durable repo partition across multiple projects

Desired behavior

Each repo/project should be able to run its own isolated agentchattr instance with:

  • Its own data_dir (separate history store)
  • Its own ports (no collisions between repos)
  • Scoped export that includes only that repo's conversations

This would make per-repo DR safe (committing exported history to the repo) and prevent cross-project history leakage.

Suggested approaches

We identified three possible directions — any of these would solve the problem:

  1. Per-repo instance isolation (recommended) — allow the launcher/profile layer to set a repo-specific data_dir and ports, so each repo runs its own server with its own store. This is the most practical option under user control today.

  2. Repo-scoped storage/export in the server — add a workspace/repo field to the data model so the server can partition and export by repo natively. This would be the cleanest long-term solution.

  3. Export filtering — add a query parameter to /api/export (e.g., ?channel=workflow,app-ui) to scope the export to specific channels. Less robust than options 1-2 but simpler to implement.

Context

We're using agentchattr with multiple AI agents (Claude, Codex, Gemini) in a Flutter app project. We recently built a committed portable DR layer for our issue tracker (Beads) and wanted to extend the same protection to our agentchattr chat history. The shared-store limitation is what blocked us from including agentchattr in that DR layer.

Acceptance criteria

  • Each repo can run with its own isolated data_dir and ports
  • Exporting from one repo must not include another repo's history
  • A clear, documented path for per-repo persistence that works with the existing launcher/profile model

Thank you for building such a useful tool — this is a feature request to help us use it even more confidently across multiple projects!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions