Skip to content

fix(claude-code-memory-plugin): add X-OpenViking-Account and X-OpenViking-User headers#2

Closed
libinghui123 wants to merge 1 commit intoCastor6:mainfrom
libinghui123:fix/claude-code-memory-plugin-tenant-headers
Closed

fix(claude-code-memory-plugin): add X-OpenViking-Account and X-OpenViking-User headers#2
libinghui123 wants to merge 1 commit intoCastor6:mainfrom
libinghui123:fix/claude-code-memory-plugin-tenant-headers

Conversation

@libinghui123
Copy link
Copy Markdown

@libinghui123 libinghui123 commented Apr 9, 2026

Summary

  • Add X-OpenViking-Account and X-OpenViking-User tenant headers to all OpenViking API requests
  • Fixes 400 "ROOT requests to tenant-scoped APIs" error

Changes

  • config.mjs: Read account and user from claude_code config section (fallback "default")
  • auto-recall.mjs / debug-recall.mjs: Set headers in fetchJSON
  • auto-capture.mjs / debug-capture.mjs: Set headers in fetchJSON
  • memory-server.ts + memory-server.js: Add account/user to OpenVikingClient class

Test

Verified with debug logs showing all requests returning 200 with correct headers.

…king-User headers

The OpenViking API requires X-OpenViking-Account and X-OpenViking-User
tenant headers for all requests. Without these headers, the API returns
400 "ROOT requests to tenant-scoped APIs" errors.

This fix adds:
- config.mjs: read account and user from claude_code section (fallback "default")
- auto-recall.mjs, debug-recall.mjs: set headers in fetchJSON
- auto-capture.mjs, debug-capture.mjs: set headers in fetchJSON
- memory-server.ts + memory-server.js: add account/user to OpenVikingClient

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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