{"version":"2.1.219","anchor":"register-repo-root-accepts-launch-time-directories-and-rejec","canonical_anchor":"register-repo-root-accepts-launch-time-directories-and-rejec","heading":"register_repo_root accepts launch-time directories and rejects duplicates","tier":"use","area":"SDK","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219\/e\/register-repo-root-accepts-launch-time-directories-and-rejec","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219","markdown":"### register_repo_root accepts launch-time directories and rejects duplicates\n\nYou can register repo roots under any directory passed with --add-dir, and duplicates now say so clearly.\n\n**What**\n\nThe SDK register_repo_root request no longer requires the target to be a strict subdirectory of cwd, and now reports an already-registered directory as its own error instead of a subdirectory failure.\n\n**Details**\n\n- the path is realpathed and confirmed to be a directory before anything else\n- accepted locations are directories under cwd or under any directory passed at launch via cliArg sources, that is `--add-dir` or the SDK `additionalDirectories`\n- registering a directory that is already a working directory fails with a dedicated error\n- on success, DirectoryAdded hooks are dispatched; hook failures are debug-logged and do not fail the request\n- the request schema description was rewritten to match\n- previously this threw `register_repo_root: ... is not a subdirectory of cwd`\n\n**Evidence**\n\n`register_repo_root: directory is already a registered working directory`\n\n- Area: SDK\n- Names: `--add-dir`, `additionalDirectories`, `register_repo_root`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 0\/5"}