Repository navigation
Closed
Labels
Description
Overview
The NodeSpace skill file an agent reads can be newer than the nodespace CLI on the machine. When it is, nothing tells the agent. In a user trial, an agent on CLI 0.2.8 with a current skill noticed the mismatch, then carried on with "the basic commands", could not fetch the workspace's own instructions, and wrote a document into NodeSpace incorrectly.
Problem Statement
From a transcript of an external agent (Claude) in a user's trial:
- The agent reported "the CLI here (0.2.8) is older than the skill describes" and that it "has no skill guidance command, so I couldn't fetch the workspace's own instructions and worked from the basic commands instead."
nodespace skill guidanceshipped in v0.3.4 (Let agents fetch NodeSpace's skills and schemas by task, embed schemas, and render built-in skills per audience #3538, 2026-10-04); 0.2.8 is from early September. The command that delivers every built-in instruction to an external agent does not exist on that CLI.- Content starting with
-failed as a CLI flag. Fixed by Accept node content that starts with a dash; give plugin sessions the project's queue filter; add the harness scenario (refs #3721) #3740 (2026-10-11), absent from 0.2.8. The agent retried and the page was written, but as plaintextnodes with typed markdown syntax (see Agent guidance for writing markdown into nodes: import it, or create the right node type without typed syntax #4201). nodespace diagnosticsreported an error reading schemas. The cause was not established; version skew between the old CLI and a newer daemon is a candidate.- The agent's closing note said updating NodeSpace "would probably fix" the first two. It gave the user that advice only after the work was done.
What exists today:
packages/skill/SKILL.mdhas a preflight table (from Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1229) forcommand not found, a broken CLI behind thenodespacetool,Could not connect to nodespaced, a database needing an extension, and a command timeout. There is no row for a CLI that runs but is too old (for exampleunrecognized subcommand 'guidance'), and no step that runsnodespace --version. Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1229 proposed that check; it is not in the file.- The file already says never to run the installer, start the daemon, or delete anything without the user's confirmation, and to tell the user rather than act.
- A
GetDaemonVersionRPC returns the daemon's version (node_service.proto). The app uses it for the product check (Check the running daemon's executable against the app's DaemonProfile at startup #3353, Product check compares supported extension ids, not the daemon's executable name #3689). The CLI does not compare its own version with it.
Proposed Solution
- The skill file tells the agent to check the CLI version first, and to stop and tell the user to update NodeSpace when it is below what the skill needs. It must not fall back to older commands, and it must not upgrade the CLI itself (consistent with the file's existing rule about installers). The minimum is stamped into the skill at build time, so the skill and its CLI requirement come from one revision and cannot drift.
- The CLI compares its version with the daemon's and prints a clear "update needed" error on a mismatch, so a stale CLI says so on its own, including when no skill is involved.
Documentation
- Daemon and CLI Lifecycle - how the daemon and CLI are installed, started and checked; update it with the version comparison.
- ADR-093 - how coding agents receive the skill and its guidance.
- ADR-064 - which instruction channel owns what; the version gate belongs in the installed skill file, since an old CLI cannot fetch newer guidance.
- No prior ADR covers skill-to-CLI version compatibility.
Acceptance Criteria
-
SKILL.mdstarts with a version check (nodespace --version) and a stated minimum, and tells the agent to stop and ask the user to update when the CLI is older, naming what is missing. - The preflight table has a row for a CLI that is too old (for example
unrecognized subcommandfor a command the skill describes) with the same instruction. - The minimum version in the skill is produced by the build from the workspace version; a test fails when the skill's stamped minimum and the CLI's own version cannot satisfy each other.
- The CLI compares its version with
GetDaemonVersionand, on a mismatch, prints a message naming both versions and telling the user to update. A test covers a mismatch and a match. - A harness scenario starts an agent with a stub CLI reporting an old version and asserts it stops and tells the user instead of running further commands.
- The CLI's output and the skill text change, so the skill-guidance acceptance criteria above apply. Prompt snapshots are regenerated if model-facing text moves. Code passes
bun run quality:fix;bun run test:changedpasses.
Technical Specifications
Reference Files
packages/skill/SKILL.md- preflight section and the table of command outcomespackages/cli/src/-main.rsand the command layer, where the daemon call and its error output livepackages/proto/proto/node_service.proto-GetDaemonVersionpackages/daemon/src/main.rs- the daemon's--versionoutput
Implementation Details
The skill's required minimum must name a released version and travel with the skill when the skill is installed, since a stale CLI can only receive the file that is already on disk.
Non-Goals
How or whether the app offers to update a CLI found on the user's PATH is a separate product decision and is not part of this issue.
Related Issues
- Agent guidance for writing markdown into nodes: import it, or create the right node type without typed syntax #4201 (the guidance it fixes only reaches a CLI new enough to fetch it)
- Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1229 (the skill preflight this extends)
Activity
mstomar125 commentedon Nov 2, 2026
A second report of the same trial (Slack thread with Anoop): after a full cleanup and reinstall it is not yet confirmed whether the
nodespaceon PATH was still 0.2.8, so a stale CLI surviving a reinstall remains a candidate cause. Thenodespace diagnosticsschema-read error in that transcript is still unexplained;GetAllSchemasis the call that reports it (diagnostics.rs). The separate no-embedding-model search message is filed on its own.🤖 Generated with Claude Code
mstomar125 commentedon Nov 3, 2026
Picking this up (sweep drain).
mstomar125 commentedon Nov 3, 2026
Merged: SKILL.md starts with a CLI version check and preflight row, the minimum is stamped at build/install time from the workspace version, and the CLI appends update advice when a failed command meets a daemon of a different version; nodespace diagnostics reports both versions. Still open: the stub-CLI harness scenario (needs a live model), regenerating any prompt snapshot that embeds the skill text, and the daemon-and-CLI lifecycle doc update.
🤖 Generated with Claude Code
mstomar125 commentedon Nov 6, 2026
Done in the merged lifecycle doc (docs repo) and the node-creation structure test. The live-model residual is split into #4256.
mstomar125 commentedon Nov 6, 2026
Correction to the close comment: the lifecycle doc is in docs PR #139, which is still open and in review at the time of writing; it is not merged yet.
mstomar125 commentedon Nov 6, 2026
Update: docs PR #139 is now merged (961ee29), so the lifecycle doc described above is live.