Skip to content

docs: fix drift in Claude.ai (Web) - #265

Draft
jack-arturo wants to merge 1 commit into
mainfrom
docs/audit-platforms-claude-web-20260727
Draft

docs: fix drift in Claude.ai (Web)#265
jack-arturo wants to merge 1 commit into
mainfrom
docs/audit-platforms-claude-web-20260727

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

Routine docs-accuracy audit of src/content/docs/docs/platforms/claude-web.md (never previously reviewed — no entry in scripts/file-doc-map.json).

The middle finding is the significant one: an entire troubleshooting section documents a resumability feature that is dead code.

Claim Current state Fix Evidence
:::caution — "The memory service must have PORT=8001 set. Without it, Flask defaults to port 5000, causing connection refused errors from the sidecar." The service defaults to 8001, not 5000: port = int(os.environ.get("PORT", "8001")). Leaving PORT unset is the working configuration, not a failure mode. This is the same "Flask defaults to 5000" myth already removed from overview, operations/troubleshooting, and deployment/railway (#247) — this page and platforms/chatgpt were the two that had never been swept. Rewrote the caution to state the real constraint: AUTOMEM_API_URL must match whatever port the service listens on, which is 8001 unless you have overridden PORT. runtime_wiring.py#L82
Stated in three places: "The Streamable HTTP transport supports Last-Event-ID for resumability"; "Supports Last-Event-ID for stream resumability" (migration benefits); and a whole Stream replay section — "The sidecar's InMemoryEventStore persists events for 1 hour with a maximum of 1000 events per stream. If Claude.ai sends a Last-Event-ID header on reconnect, the sidecar replays missed events automatically." None of this is wired up. InMemoryEventStore is defined but never instantiated — there is no new InMemoryEventStore(...) anywhere in server.js; the only other references are two optional-chained calls (session.eventStore?.…) against SSE sessions that are created as { transport, server, res, heartbeat, type: 'sse' } with no eventStore property. The /mcp transport is built as new StreamableHTTPServerTransport({ sessionIdGenerator: undefined, enableJsonResponse: true }) — no eventStore option, which is what the SDK requires for replay. A Last-Event-ID header is therefore a no-op, and no events are retained to replay. Corrected all three. The architecture line now says the transport is stateless; the benefits bullet is dropped; the troubleshooting section is retitled "Reconnecting (Streamable HTTP)" and states plainly that there is no replay. server.js#L1063-L1066, server.js#L224, server.js#L775-L776
"Token extraction priority (sidecar getAuthToken() function)" lists seven tiers, the seventh being "AUTOMEM_API_TOKEN environment variable (fallback)" Tiers 1–6 are exactly right and in the right order. Tier 7 is not in getAuthToken() — that function ends at return bearer || headerKey || queryKey. The env fallback is applied separately at each route: const token = getAuthToken(req) || process.env.AUTOMEM_API_TOKEN. The distinction matters operationally: with AUTOMEM_API_TOKEN set on the sidecar, an unauthenticated request to /mcp succeeds using the sidecar's own token rather than returning 401. Split the list into the six tiers getAuthToken() actually checks, plus a sentence describing the route-level env fallback and its consequence. server.js#L896-L904, server.js#L1056, server.js#L1095

Spot-checked and correct, left untouched:

  • 1-hour session TTL and 5-minute sweep (SESSION_TTL_MS = 60 * 60 * 1000, setInterval(…, 5 * 60 * 1000)) — though the sweep only reaps type === 'sse' sessions, which is now consistent with the corrected "SSE sessions" wording.
  • 20-second SSE heartbeat (setInterval(…, 20000)) and the anti-buffering headers X-Accel-Buffering: no / Cache-Control: no-cache.
  • Protocol versions 2025-03-26 (Streamable HTTP) and 2024-11-05 (SSE), both stated in the source comments.
  • All four sidecar endpoints exist: /mcp, /mcp/sse, /mcp/messages, /health. Sidecar PORT default 8080 (process.env.PORT || 8080). AUTOMEM_ENDPOINT legacy alias confirmed.
  • Every advanced recall_memory parameter listed (expand_relations, expand_entities, auto_decompose, expand_min_importance, expand_min_strength, context, language, active_path, context_tags, context_types, priority_ids) is present in the sidecar's tool schema.
  • "No sessionId management needed" for Streamable HTTP — correct, and now consistent with the stateless description.
  • All six tool names and their Read/Write/Destructive classifications.

Verified against: verygoodplugins/automem@8ff266e

Questions

None.

Unverified

  • Claude.ai / Claude mobile UI navigation ("Settings → MCP Servers", "Add a new server") and whether the interface exposes custom headers at all — Anthropic-side product surface with no in-repo counterpart. The :::tip recommending header auth "when the Claude.ai interface supports it" already hedges this.
  • "Pro recommended for MCP features" — account-tier claim, not checkable here.
  • Railway one-click template contents and the Generate Domain flow.

Follow-ups

Below the severity bar for this PR:

  • The Sidecar endpoints table lists /mcp as method POST. It is registered with app.all('/mcp', …), so GET and DELETE also reach it (per the Streamable HTTP spec). POST is the correct usage to document; the table is just narrower than the route.
  • The InMemoryEventStore class itself is dead code in mcp-sse-server/server.js. Worth an issue on verygoodplugins/automem — either wire it into the /mcp transport (making this page's original claim true) or delete it. I did not open one, since choosing between those is a maintainer call.

Generated by Claude Code as part of the recurring automem-docs-review routine.


Generated by Claude Code

Remove the false "Flask defaults to port 5000" caution, correct the
Last-Event-ID resumability claims (the /mcp transport is stateless and
has no event store), and fix the attribution of the env-var token
fallback in the token extraction priority list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bh4cvNW2mR2vCoyg3FDQL3
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying automem-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: e32f2b9
Status: ✅  Deploy successful!
Preview URL: https://c6166112.automem-website.pages.dev
Branch Preview URL: https://docs-audit-platforms-claude-3y31.automem-website.pages.dev

View logs

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.

2 participants