diff --git a/arborist/cli.py b/arborist/cli.py index fc88114..5882d45 100644 --- a/arborist/cli.py +++ b/arborist/cli.py @@ -7774,7 +7774,14 @@ def _session_repl(args: argparse.Namespace, sess) -> int: from arborist.qa.client import OpenAICompatibleClient client = OpenAICompatibleClient(base_url=endpoint) - qa_db = Path.home() / ".arborist" / "qa.db" + # Honor --shards-dir like other commands (cli line ~550-555). Without + # this, session-driven providence_cache writes land in ~/.arborist/ + # qa.db while the viz reads /qa.db — session cache_keys + # never surface in the Merkle Command Center. + if getattr(args, "global_shards_dir", None): + qa_db = Path(args.global_shards_dir) / "qa.db" + else: + qa_db = Path.home() / ".arborist" / "qa.db" qa_db.parent.mkdir(parents=True, exist_ok=True) policy = {"answer_mode": args.answer_mode}