Repro
- Fresh
/setup-gbrain flow on macOS, picked PGLite local
- Reach Step 7.5 (transcript ingest) with 153 transcripts on disk
gstack-gbrain-sync.ts --full --no-brain-sync (or gstack-memory-ingest.ts --bulk directly)
Observed
[put-error] timelines/Sanai-Ai-sanai-app/...: Command failed:
gbrain put_page --slug timelines/... --title timeline ... --type timeline --tags timeline,repo:...
Unknown command: put_page
Run gbrain --help for available commands.
Ingest pass complete (bulk):
written: 0
failed: 153
All 153/153 fail with Unknown command: put_page.
Root cause
bin/gstack-memory-ingest.ts:762-784 (function gbrainPutPage) shells out:
const args = [
"put_page",
"--slug", page.slug,
"--title", page.title,
"--type", page.type,
"--tags", page.tags.join(","),
];
execFileSync("gbrain", args, { input: page.body, ... });
But no gbrain version (verified against v0.18.2 and master v0.27.0) has a put_page CLI subcommand. put_page is the MCP tool name; the CLI subcommand is put <slug> (reads markdown body from stdin), defined as case 'pages': at master src/cli.ts.
The --slug / --title / --type / --tags flags also don't exist on gbrain put — title/type/tags are inferred from frontmatter in the body, or must be set via gbrain pages update after.
Proposed fix
Replace gbrainPutPage with the CLI shape gbrain actually accepts:
function gbrainPutPage(page: PageRecord): { ok: boolean; error?: string } {
if (!gbrainAvailable()) return { ok: false, error: "gbrain CLI not in PATH" };
try {
// Prepend YAML frontmatter so gbrain infers title/type/tags
const frontmatter = [
"---",
`title: ${JSON.stringify(page.title)}`,
`type: ${page.type}`,
`tags: [${page.tags.map((t) => JSON.stringify(t)).join(", ")}]`,
"---",
"",
].join("\n");
const body = frontmatter + page.body;
execFileSync("gbrain", ["put", page.slug], {
input: body,
encoding: "utf-8",
timeout: 30000,
stdio: ["pipe", "pipe", "pipe"],
});
return { ok: true };
} catch (err) {
return { ok: false, error: err instanceof Error ? err.message : String(err) };
}
}
Comments at bin/gstack-memory-ingest.ts:37-38 and :176 also reference put_page; update to put.
Environment
- gstack v1.26.3.0 (just upgraded from 1.15.0.0 via
/gstack-upgrade)
- gbrain v0.18.2 originally installed by
gstack-gbrain-install; verified bug also reproduces on master v0.27.0
- macOS Darwin 25.3.0, fish shell, bun 1.3.11
Workaround for users hitting this today
Skip Step 7.5 in /setup-gbrain — the rest of the flow (code import, MCP registration, repo policy) works fine. Code search via gbrain query still indexes the repo's markdown. Only the v1.26.0 memory features (skill manifests, salience block) stay disabled.
Repro
/setup-gbrainflow on macOS, picked PGLite localgstack-gbrain-sync.ts --full --no-brain-sync(orgstack-memory-ingest.ts --bulkdirectly)Observed
All 153/153 fail with
Unknown command: put_page.Root cause
bin/gstack-memory-ingest.ts:762-784(functiongbrainPutPage) shells out:But no gbrain version (verified against v0.18.2 and master v0.27.0) has a
put_pageCLI subcommand.put_pageis the MCP tool name; the CLI subcommand isput <slug>(reads markdown body from stdin), defined ascase 'pages':at mastersrc/cli.ts.The
--slug/--title/--type/--tagsflags also don't exist ongbrain put— title/type/tags are inferred from frontmatter in the body, or must be set viagbrain pages updateafter.Proposed fix
Replace
gbrainPutPagewith the CLI shape gbrain actually accepts:Comments at
bin/gstack-memory-ingest.ts:37-38and:176also referenceput_page; update toput.Environment
/gstack-upgrade)gstack-gbrain-install; verified bug also reproduces on master v0.27.0Workaround for users hitting this today
Skip Step 7.5 in
/setup-gbrain— the rest of the flow (code import, MCP registration, repo policy) works fine. Code search viagbrain querystill indexes the repo's markdown. Only the v1.26.0 memory features (skill manifests, salience block) stay disabled.