Fission-AI/OpenSpec · error · ArchiveBlockedError
archive_path_outside_root
archive_path_outside_root
Error message
Refusing to archive through a path outside the OpenSpec root: ${managedDir} What it means
ArchiveBlockedError path-confinement guard: one of the managed directories (changes, archive, specs) resolves outside the OpenSpec root it must live under (e.g. via a symlink), so the archive refuses to operate.
Solutions
- Replace the escaping symlink with a real directory inside the root
- Check the store/project configuration for overridden managed paths
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/archive.ts:1126 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/8812d8db9bc0ca99.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/archive.ts:1126
private async run(
changeName: string | undefined,
options: ArchiveOptions,
root: ResolvedOpenSpecRoot,
json: boolean
): Promise<ArchiveResult | null> {
const changesDir = root.changesDir;
const archiveDir = root.archiveDir;
const mainSpecsDir = root.specsDir;
for (const [allowedDirectory, managedDir] of [
[root.path, changesDir],
[changesDir, archiveDir],
[root.path, mainSpecsDir],
] as const) {
try {
FileSystemUtils.assertPathWithin(allowedDirectory, managedDir);
} catch {
throw new ArchiveBlockedError(
'archive_path_outside_root',
`Refusing to archive through a path outside the OpenSpec root: ${managedDir}`
);
}
}
// Get change name interactively if not provided
if (!changeName) {
if (json) {
throw new ArchiveBlockedError(
'archive_change_name_required',
'A change name is required: archive --json is non-interactive.',
withStoreFlag(root, 'openspec archive <change-name> --json')
);
}
const selectedChange = await this.selectChange(changesDir, root, options);
if (!selectedChange) {
console.log('No change selected. Aborting.');View on GitHub (pinned to 6926ccb18a)