garrytan/gstack · error · Error
Editor exited with status ${result.status}; no changes saved
Error message
Editor exited with status ${result.status}; no changes saved. What it means
Error "Editor exited with status ${result.status}; no changes saved." thrown in garrytan/gstack.
Source
Thrown at browse/src/domain-skill-commands.ts:196
}
const slug = getCurrentProjectSlug();
// Read current body to seed the editor
const list = await listSkills(slug);
const current = [...list.project, ...list.global].find((r) => r.host === host);
if (!current) {
throw new Error(
`Cannot edit: no skill for ${host}.\n` +
'Cause: skill does not exist in this project or global scope.\n' +
'Action: $B domain-skill save to create one first.'
);
}
const editor = process.env.EDITOR || 'vi';
const tmpFile = path.join(os.tmpdir(), `gstack-domain-skill-${process.pid}-${Date.now()}.md`);
await fs.writeFile(tmpFile, current.body, 'utf8');
const result = spawnSync(editor, [tmpFile], { stdio: 'inherit' });
if (result.status !== 0) {
await fs.unlink(tmpFile).catch(() => {});
throw new Error(`Editor exited with status ${result.status}; no changes saved.`);
}
const newBody = await fs.readFile(tmpFile, 'utf8');
await fs.unlink(tmpFile).catch(() => {});
if (newBody === current.body) {
return `No changes for ${host}.`;
}
// Re-save (always per-project; promotion is explicit)
const page = (global as any).__bm?.getPage?.();
void page; // we're in the daemon — page available, but for edit we trust the existing host
const row = await writeSkill({
host: current.host,
body: newBody,
projectSlug: slug,
source: 'human',
classifierScore: 0,
});
return formatSavedOk(row, slug);
}View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at browse/src/domain-skill-commands.ts:196 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/c66de833a0cca2c5.
Report an issue: GitHub.