Missing 'context' CLI command breaks Memorix 1.8.1 integration (Context Builder exists in package but is not registered)
Summary
The codegraph context CLI command is not registered in v1.5.0, even though a Context Builder implementation exists in the package (lib/dist/context/index.js). This breaks the Memorix 1.8.1 external-CodeGraph integration, which invokes codegraph context --path <project-root> --format json --max-nodes 8 --no-code <task> and falls back to its Lite heuristic index when the command is missing.
Repro
codegraph context --path <any-project> "trace the auth flow"
# error: unknown command 'context' (exit 1)
Also visible via codegraph --help: 22 registered commands — init, uninit, index, sync, status, query, explore, prompt-hook, node, files, daemon, serve, unlock, callers, callees, impact, affected, install, uninstall, telemetry, upgrade, version — none of them is context.
Evidence
lib/dist/context/index.js(65,711 bytes) exists and implements the Context Builder ("Builds rich context for tasks by combining FTS search with graph traversal. Outputs structured context ready to inject into Claude."). Help text "codegraph context— Build context for a task" also appears in bin/codegraph.jshelp/usage strings, but the command is never registered via.command('context ...')inbin/codegraph.js.codegraph status --jsonworks fine (used by Memorix for health checks → reportsready), onlycontextis missing.
Environment
- codegraph v1.5.0 (package @colbymchenry/codegraph, bundle @colbymchenry/codegraph-win32-x64) on Windows
- memorix v1.8.1 (npm global), which documents the expected contract in its docs:
codegraph context --path <project-root> --format json --max-nodes 8 --no-code <task>(see Memorix docs/1.2.0-PROVIDER-QUALITY.md)
Impact on Memorix
Memorix codegraph status reports "External semantic CodeGraph: ready", but memorix codegraph context-pack --task ... fails with "External semantic CodeGraph is unavailable; using Lite structural evidence for this brief" because the context invocation errors out. Cautation text changes from "timed-out" to "unavailable" depending on the failure path.
Request
Please register the existing context command in bin/codegraph.js (it appears implemented in lib/dist/context/index.js), or document the correct replacement command/flag shape so the Memorix contract can be updated/vendored.
Confirmed — your evidence was exactly right, @scursel, and thank you for the unusually precise report. The Context Builder does ship in the package, the help text has advertised codegraph context <task> — but the command was never registered with commander. We checked the history: this isn't a removal or a v1.5.0 regression, the registration has been missing since the very first commit, so every release advertised a command that didn't exist. Your integration was built against documentation that was ahead of reality.
Fix is up in #1613: context <task...> is now registered, and the flag shape matches the Memorix contract verbatim — codegraph context --path <project-root> --format json --max-nodes 8 --no-code <task> works as documented (--format validates markdown/json, JSON is clean machine-parseable stdout with diagnostics on stderr, --max-nodes validated, --no-code omits code blocks). The exact invocation above is pinned in the test suite so the contract can't silently drift again.
It'll be in the next release once merged.
Hi Colby, Thanks for the feedback. I'm glad the fix is already on its way and that the test has been fixed to avoid future problems. I just wanted to give proper credit: the problem was discovered by DeepSeek V4 Flash using DeepSeek Harness. Anyway, thank you for your feedback.
Em ter., 25 de ago. de 2026 às 12:49, Colby Mchenry < @.***> escreveu:
colbymchenry left a comment (colbymchenry/codegraph#1611) https://github.com/colbymchenry/codegraph/issues/1611#issuecomment-5413015580
Confirmed — your evidence was exactly right, @scursel https://github.com/scursel, and thank you for the unusually precise report. The Context Builder does ship in the package, the help text has advertised codegraph context
— but the command was never registered with commander. We checked the history: this isn't a removal or a v1.5.0 regression, the registration has been missing since the very first commit, so every release advertised a command that didn't exist. Your integration was built against documentation that was ahead of reality. Fix is up in #1613 https://github.com/colbymchenry/codegraph/pull/1613: context <task...> is now registered, and the flag shape matches the Memorix contract verbatim — codegraph context --path
--format json --max-nodes 8 --no-code works as documented (--format validates markdown/json, JSON is clean machine-parseable stdout with diagnostics on stderr, --max-nodes validated, --no-code omits code blocks). The exact invocation above is pinned in the test suite so the contract can't silently drift again. It'll be in the next release once merged.
— Reply to this email directly, view it on GitHub https://github.com/colbymchenry/codegraph/issues/1611?email_source=notifications&email_token=BPXX2ODJXZ2CJRO733T2SDT5LWYSNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBRGMYDCNJVHAYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5413015580, or unsubscribe https://github.com/notifications/unsubscribe-auth/BPXX2OBMVSIV7QDSG7PRP635LWYSNAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMZXGA3TQMRVGU5US43TOVSTWNJSGM2TSMRRGIYTBILWAI . You are receiving this because you were mentioned.Message ID: @.***>
-- Gabriel Scursel Postos Scursel | Pousada Scursel Transnafta Transportes | Gala Auto Center +55 47 3357-3602 | +55 47 996518621
Fixed in #1613, merged to main — it'll be in the next release.
codegraph context <task> is now registered (it had been advertised in the usage header since the first commit but never wired up). Flags map 1:1 onto the existing buildContext API: -p, --path, -f, --format markdown|json, -n, --max-nodes, --no-code. JSON output is clean stdout (errors and warnings go to stderr), so the Memorix invocation codegraph context --path <root> --format json --max-nodes 8 --no-code <task> works as documented.
Verified: on v1.5.0 that exact command fails with unknown command 'context' (exit 1); on main it exits 0 with parseable JSON (query, summary, entryPoints, nodes, edges, codeBlocks, relatedFiles, stats), and the markdown default works too. Thanks for the report.