Platform Cutover 2026-05-19 — Composio + Mem0 + V5 Frozen + Anthropic
ADR-057: Platform Cutover 2026-05-19 — Composio + Mem0 + V5 Frozen + Anthropic
Status: Accepted Date: 2026-05-19 Author: Claude Code (claude/cutover-2026-05-19) Supersedes: ADR-031 (Hermes Agent Layer), ADR-032 (Hindsight Auth Gate), ADR-038 (Nango Token Management) Related: ADR-053 (Lean Stack: Composio + Mem0 + Anthropic), ADR-054 (V5 Side-Channel Retirement)
Context
By 2026-05-15 V5 was frozen as a fallback (AWS / LLM / call_api / batch_execute only). Composio shipped as the canonical OAuth SaaS surface (Phase D smokes 6/6, PR #567). Mem0 ($19/mo) was signed up 2026-05-16. The lean-stack thesis in ADR-053 was complete on paper but the repo still carried the full weight of the retired infra:
- Hindsight — self-hosted memory worker at
hindsight.ascendgtm.net(CF Access + bearer). Replaced by Mem0 ($19/mo, fully migrated banks). 80+ references across docs/scripts/tests/src. - Nango Cloud — OAuth token write path. Replaced by Composio MCP (OAuth lives entirely inside Composio’s project tenancy). 14 modules + tests still wired.
- TOKEN_MANAGER Durable Object — alarm-based KV token refresh. Unnecessary when Composio owns OAuth end-to-end; the request path never sees a token because Composio executes the upstream call.
- ascend-agent-vps — Hetzner CPX41 VPS hosting n8n + bridge API. Decommissioned in practice (V5 is CF Workers edge); references litter docs/handover/RUNBOOK.
- hermes-server — Nous Hermes self-hosted agent runtime. Archived 2026-05-15 in favor of a headless
claude -pwrapper (~/.hermes-v3/). Source-of-truth still scattered acrossdocs/tools/hermes/**,docs/agents/hermes-*.md, plan docs. - Legacy Composio SSE MCP URL —
backend.composio.dev/v3/mcp/{server_id}/sse(Composio’s older SSE transport). The canonical surface isconnect.composio.dev/mcp/pr_8AjnN9gdcrYt(FleetView Streamable HTTP). Note:backend.composio.dev/api/v3/toolsREST is unchanged — this ADR only retires the SSE MCP transport, not the REST API.
Carrying these names in source/configs/tests was creating real harm: new agents grep for “hindsight” or “nango”, find live-looking code, and reach for the retired pattern. Pre-commit checks passed, but the codebase was lying about what it actually is.
Decision
After 2026-05-19 the canonical surface is exactly:
| Plane | Tool | URL | Purpose |
|---|---|---|---|
| OAuth SaaS | Composio | connect.composio.dev/mcp/pr_8AjnN9gdcrYt | HubSpot, Salesforce, Google, Slack, Gong, Apollo, SEMrush, Perplexity, Gamma, QuickBooks (993+ tools) |
| Memory | Mem0 | mcp__mem0__* | Sole long-term memory backend. user_id namespaces hindsight-{ascend-infra,kahuna,mishaal} retained for migrated-memory continuity (naming only — not implying any active Hindsight Worker). |
| AWS / LLM / Platform | V5 Worker (frozen) | ascend-gateway-v5.ascendgtm.workers.dev/mcp | llm_invoke, aws_bedrock_invoke, aws_ses_send, aws_textract, call_api, batch_execute, discover_apis. No new tools. Bugfix-only deploys. |
| LLM (model API) | Anthropic | api.anthropic.com | Claude API for user-facing MCP calls / explicit product features. All cron + background LLM calls use DeepSeek (model policy). |
These names are RETIRED — they MUST NOT reappear in src/, test/, scripts/, wrangler.toml, or MCP configs:
hindsight(any case)nango(any case)TOKEN_MANAGER(DO binding name)ascend-agent-vpshermes-serverbackend.composio.dev/v3/mcp/(legacy SSE MCP transport URL)
A drift guard lives at scripts/checks/22-no-retired-names.ts. It is inert in PR-3 (gates: []) and activated in PR-4 once the src/test/wrangler rip lands atomically. Once active it gates pre-commit and pre-deploy.
Invariant #5 update (V5 architectural invariants)
The previous wording — “No external vendors in the token read path. Exception: Nango Cloud is the token write path” — is replaced by:
Composio owns OAuth end-to-end. The V5 gateway no longer holds OAuth tokens for any SaaS provider covered by Composio. The V5 token KV (
tokens:{tenant}:{provider}:{account_id}) is retained only for providers not covered by Composio (AWS via aws4fetch signing keys, Anthropic API key, etc.). No DO-based token refresh. No external auth brokers.
This update lands in docs/architecture/ASCEND-CLOUD-NATIVE-V2-ENGINEERING-PLAN.md and .claude/rules/v5-invariants.md in the same PR as this ADR.
PR sequencing
- PR-1 (shipped, #571) — Memory cutover, hitlist, QBO toolkit scaffold, MCP config rip.
- PR-3 (this PR) — Docs sweep + ADR-057 + drift guard scaffold (inert) + scripts cleanup. Zero
src/touches. - PR-4 —
src/+test/+wrangler.tomlrip. Atomic refactor ofsrc/handlers/admin/tokens.ts+src/handlers/oauth-callback.ts(removeTOKEN_MANAGER.idFromName/.getpaths; Composio-managed providers short-circuit), DO removal, drift guard activated. - PR-2 (gated) — Destructive prod actions: Hindsight Worker delete + Hetzner VPS destroy + n8n Cloud cancel. Requires explicit user ack each step.
Consequences
Positive:
- One source of truth per concern. New agents can no longer accidentally wire to retired infra.
- Pre-commit + pre-deploy gates catch any regression mechanically.
- Invariants stop lying — invariant #5 now matches actual deployed reality.
Negative / risks:
- ADR sequencing chaos:
ADR-055-googleads-custom-auth-config.mdandADR-056-unifiedto-evaluation.mdexist between this ADR and the cutover ADRs it supersedes. The supersedes-chain is documented in the front-matter; no renumbering. - Mem0 single-tenant for memory creates vendor concentration. Acceptable at $19/mo; if Mem0 has an outage we lose long-term memory only (operational tools keep working through Composio). Re-eval trigger: any Mem0 incident >1h, or pricing change >2× ($38/mo).
- PR-4 is the riskier piece — touches the hot path. Bench:
tokens.tsandoauth-callback.tsComposio-managed branch must short-circuit before the DO call site, so removing the binding can’t leak past types.
Receipts
- Composio Phase D smokes: PR #567 (6/6 toolkits verified)
- Mem0 signup: 2026-05-16
- V5 freeze: 2026-05-15 (HANDOVER.md)
- Hermes V3 wrapper:
~/.hermes-v3/(replaces Nous Hermes archived 2026-05-15) - Lean-stack thesis: ADR-053
- Cutover plan + hitlist (archived):
docs/archive/cutover-2026-05-19/EXECUTE.md,docs/archive/cutover-2026-05-19/hitlist.md