Skip to content

The coding-agent plugins declare a minimum server version and SessionStart warns when the server is older - #328

Merged
zlareb1 merged 4 commits into
mainfrom
feat/plugin-min-server
Nov 7, 2026
Merged

zlareb1 merged 4 commits into
mainfrom
feat/plugin-min-server

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The Claude Code and Codex plugins name the oldest Loom server they support, so a later release can warn a session started against an older server, in one line, and the loom-status check reports the same. GET /v1/health reports the server's version.

Why

The plugins carry their own version and update through each client's plugin manager, apart from the server. A plugin newer than the server it talks to fails in its hooks one op at a time, with nothing to tell the user that the server is the thing to upgrade. Each plugin now declares the oldest server its hooks support, and SessionStart says when the connected server is older. It never blocks a session.

  • minServerVersion in both manifests (integrations/claude-code-plugin/.claude-plugin/plugin.json, integrations/codex-plugin/.codex-plugin/plugin.json), kept equal by tests/unit/test_codex_plugin.py, a plain X.Y.Z no newer than the server's own version. It rises only in a release pull request, to that release, when a hook merged since the previous release needs an op it first serves. Raised on main before the release, it would tell every main build and every user of the last release to upgrade to a release that does not exist yet. .claude/rules/plugins.md and the release process page say so. It is 1.0.0: every op the hooks, lib/ and bin/ name (34 of them) is listed in v1.0.0's operations reference.
  • The check (lib/server-version.mjs). SessionStart already made one GET /v1/health to measure the round trip. probeHealth now also returns that answer's body, and the call runs inside the primer's Promise.all, so there is no extra round trip. It is bounded by 3 seconds, or by a lower LOOM_HOOK_TIMEOUT_MS, since SessionStart now waits for it.
    • When the reported version is older than the minimum, the primer's notices gain one line: loom: the Loom server at <url> runs <v>, older than <min>, the oldest this plugin (<plugin v>) supports; upgrade the server.
    • A prerelease counts as its release, so 1.2.0-rc.1 meets a minimum of 1.2.0.
    • Nothing is printed when the version cannot be read: a non-2xx answer, an unreachable or hung server, no version field, a version that is not SemVer, or no readable manifest.
  • The loom-status skill's client check (bin/loom-client-status.mjs) reports the same sentence as a server version warning, which does not fail the check.
  • GET /v1/health gains version (the value of server/__init__.py). Its answer is unauthenticated and already carries build_commit, so this exposes nothing new. No released server sends the field yet, so the warning fires only against servers from the release that ships this change on.

Both plugins move from 1.2.9 to 1.2.10.

Scope and risk

The SessionStart hook in both plugins (the Codex copy is generated by scripts/codegen/agent_plugin_sync.py), one new lib module, probeHealth (renamed from measureRoundTrip, with its bound) in lib/loom-client.mjs, the loom-status client check and skill text, the two manifests, the health answer, hooks/HOOKS.md, the plugins rule, and three doc pages. The hook keeps every existing fail-open path. A health call that hangs or fails resolves with no body and yields an empty line; the .catch still turns anything that throws into an empty line. With LOOM_INJECT_CONTEXT=false, or no token and a failed sign-up, the hook exits before the health call and prints nothing, as it did.

Compatibility, rollout and rollback

  • Wire: GET /v1/health response gains version.
  • Operator steps: none.
  • Rollback: revert. An installed plugin at 1.2.10 keeps checking, and stays silent against a server without the field.

Tests

  • integrations/claude-code-plugin/tests/server-version.test.mjs (8 tests) covers parsing, comparison, the line's text and reading the manifest. It also runs the real hook against a fake server: one warning for an older server, and silence for a current version, no field, a non-SemVer version, bad JSON, a hung health call and nothing listening. Another test checks that a session against a hung health call finishes in under 2.5 s with LOOM_HOOK_TIMEOUT_MS=500, below the 3 s default. A last test imports the Codex copy of lib/server-version.mjs and checks that its pluginManifest() reads .codex-plugin/plugin.json from its own location.
  • The loom-status client check (bin/loom-client-status.mjs) adds a server version WARN check, without failing, when the server is older; a test covers it.
  • node --test integrations/claude-code-plugin/tests/*.test.mjs: 587 passed.
  • tests/unit/test_codex_plugin.py checks both manifests' minServerVersion. tests/unit/test_health_problems.py checks version in the health answer.
  • python3 scripts/codegen/agent_plugin_sync.py --check: the Codex copies are current.
  • Codex (codex-cli 0.162.1) installs and enables the plugin at 1.2.10 with the new manifest key, from this branch as a local marketplace in a throwaway CODEX_HOME.
  • claude plugin eval was not run for the loom-status skill's two-line change: it spends model calls.
  • claude plugin validate integrations/claude-code-plugin passes, with a warning that it does not know minServerVersion; it ignores the field at load time.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. The op list behind the minimum was checked against the v1.0.0 tag's registry.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand: the Codex plugin copies.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds, if frontend/ changed: unchanged.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

@zlareb1
zlareb1 force-pushed the feat/plugin-min-server branch 3 times, most recently from eda1304 to c3b38e5 Compare November 7, 2026 10:28
zlareb1 and others added 4 commits November 7, 2026 10:40
…Start warns when the server is older

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… only what the server sends

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the feat/plugin-min-server branch from 7e700f6 to 02aa8aa Compare November 7, 2026 10:41
@zlareb1
zlareb1 merged commit 532a4a2 into main Nov 7, 2026
35 of 38 checks passed
@zlareb1
zlareb1 deleted the feat/plugin-min-server branch November 7, 2026 11:01
@zlareb1 zlareb1 mentioned this pull request Nov 12, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant