Stateless HTTP transport + fix MCP-mode evals for agent-sdk 0.3.x tool search#79
Merged
Merged
Conversation
Serve skilljack over stateless Streamable HTTP at POST /mcp as an alternative
to stdio. Enabled via --http / --http=<port> (single token so it isn't parsed
as a skill dir) or SKILLJACK_HTTP_PORT / SKILLJACK_HTTP; default port 3000.
- src/http-transport.ts: buildCoreServer() (load-skill, skill-resource,
resources, prompts) + startHttpServer() using a per-request
StreamableHTTPServerTransport({ sessionIdGenerator: undefined }).
- src/index.ts: getHttpPort() + branch to startHttpServer() right after startup
discovery; the stdio path (UI config/display tools, polling, watchers,
dynamic refresh) is unchanged and HTTP-mode skips it.
- Limitation: stateless HTTP has no server->client stream, so listChanged /
resources/updated notifications are not delivered; skills are read at startup.
- Tests: initialize + tools/list + resources over an MCP client; GET -> 405.
Full suite 232 green. Docs updated (README, CLAUDE.md, skilljack-docs).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…claimer
MCP-mode skill activation collapsed to ~1/7 on agent-sdk 0.3.x due to two
independent regressions:
A) stdio connect race — SDK connects stdio MCP servers async, so a stdio
skilljack is `pending` at the first turn and its tools are absent
(upstream anthropics/claude-code#49753).
B) tool search / deferred tools — MCP tool *descriptions* are deferred out
of context, so the model never sees skilljack's <available_skills> catalog
(which lives in the load-skill tool description) and won't activate.
Eval harness now works around both: MCP modes run skilljack over HTTP
(startSkilljackHttp, --http=0 ephemeral, connected on turn 1) and set
ENABLE_TOOL_SEARCH=false so tool descriptions load into context. Verified:
code-style / template-generator / xlsx-openpyxl now PASS activation+following
(were 0/3). Subagent-delegation approach dropped (band-aid, didn't address B).
Also adds getHttpPort() support for --http=0 (ephemeral) and cleanupEvalServers().
Product disclaimer (README, CLAUDE.md, skilljack-docs, evals/README): the
catalog-in-tool-description method only surfaces when tool search is disabled;
on modern Claude Code (tool search on) auto-activation is unreliable. Do not
merge the catalog into server instructions (deliberately independent; going
optional in-spec) — handling tool-search-on is an open product problem.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
--http[=port]/SKILLJACK_HTTP_PORT). Serves the core skill surface atPOST /mcpvia per-requestStreamableHTTPServerTransport({ sessionIdGenerator: undefined }). Default stdio path unchanged. (src/http-transport.ts, tests, docs.)pendingat the model's first turn (upstream Race between initialize control_request and MCP refresh causes tools to drop from first request anthropics/claude-code#49753). → harness now runs skilljack over HTTP (--http=0),connectedon turn 1.<available_skills>catalog (which lives in theload-skilldescription) and won't activate. → harness setsENABLE_TOOL_SEARCH=false.instructions.Not done
Subagent delegation was explored and dropped — it's a band-aid that doesn't address regression B (branch name predates that decision).
Verification
npm run build+npm test→ 232 green (incl. 2 new HTTP transport tests).node dist/index.js --http=3000 ./evals/skills→initialize+tools/listover an MCP client; GET → 405.Refs: #78 (tool-search product issue), anthropics/claude-code#49753 (stdio race).
🤖 Generated with Claude Code