Context
The documented Claude Code integration relies on rerouting ANTHROPIC_BASE_URL through memory-proxy. That works for API-key users, but Claude Code sessions authenticated via subscription (OAuth) cannot be pointed at a proxy — overriding the base URL breaks subscription auth entirely. Those users currently have no supported way to feed conversations into TencentDB Agent Memory.
Working pattern
I integrated a subscription-authenticated Claude Code with the platform using two small shell hooks (no proxy involved, answers keep flowing through the subscription):
- Stop hook: extracts the last user/assistant exchange from the session transcript and
POST /v2/conversation/add (Bearer = business user key). Fail-silent, curl --max-time 4.
- SessionStart hook:
POST /v2/core/read + /v2/scenario/ls, prints a compact L3-profile block that Claude Code injects into session context.
The L0→L1 pipeline picks conversations up exactly as with the proxy path (verified: atoms extracted).
Proposal
Ship this as a documented example (e.g. examples/claude-code-hooks/) for subscription-auth users. Happy to contribute my scripts as a starting point.
Related wish: a Dockerfile for memory-core so security-conscious users can build the full stack from source (proxy and hub already have one).
Context
The documented Claude Code integration relies on rerouting
ANTHROPIC_BASE_URLthrough memory-proxy. That works for API-key users, but Claude Code sessions authenticated via subscription (OAuth) cannot be pointed at a proxy — overriding the base URL breaks subscription auth entirely. Those users currently have no supported way to feed conversations into TencentDB Agent Memory.Working pattern
I integrated a subscription-authenticated Claude Code with the platform using two small shell hooks (no proxy involved, answers keep flowing through the subscription):
POST /v2/conversation/add(Bearer = business user key). Fail-silent,curl --max-time 4.POST /v2/core/read+/v2/scenario/ls, prints a compact L3-profile block that Claude Code injects into session context.The L0→L1 pipeline picks conversations up exactly as with the proxy path (verified: atoms extracted).
Proposal
Ship this as a documented example (e.g.
examples/claude-code-hooks/) for subscription-auth users. Happy to contribute my scripts as a starting point.Related wish: a
Dockerfilefor memory-core so security-conscious users can build the full stack from source (proxy and hub already have one).