CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

ov-memory-doctor

The guide walks through running the doctor, interpreting its findings, and performing targeted checks when the report is inconclusive. It includes host-specific install and configuration fixes, server health checks, and safeguards for handling API keys and making changes.

Quality

92%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

SKILL.md
Quality
Evals
Security

OpenViking Context Doctor

Troubleshooting for the OpenViking context integration in Claude Code, Codex, Cursor, TRAE, TRAE CN, ZCode, Antigravity, Kimi Code, CodeBuddy Code, Qoder CLI, OpenCode, pi and DeepSeek Harness. Three things go wrong on a user's machine, each silently:

  • Install — the plugin the host loads (Claude Code, Codex, Antigravity, Kimi Code, CodeBuddy Code, Qoder CLI, OpenCode, pi, DeepSeek Harness) or the hooks and MCP server the installer wrote into the host's configuration (Cursor, TRAE, ZCode), the runtime beside them, and the skills. When these are wrong, nothing runs and nothing is logged anywhere.
  • Configuration — ~/.openviking/ovcli.conf, ~/.openviking/ov.conf and OPENVIKING_* environment variables, resolved as env → ovcli.conf → ov.conf → defaults. A malformed file reads as "no config" and the integration silently falls back to http://127.0.0.1:1933 with no key (Claude Code disables itself instead); a stray env var silently overrides the file.
  • Connection — on a self-hosted server /health answers 200 even with a bad key, so everything can look reachable while every real request 401s. On OpenViking Cloud the gateway authenticates /health and /ready too, so the same probe answers 401 without a key and says nothing about the url.

When the resolved url is loopback, the server runs on this machine and the doctor adds a Server health section: whether anything listens on the port, plugin-only keys in ov.conf that make the server refuse to start, and GET /ready, the server's own per-subsystem verdict. For a remote server only /ready is probed. Everything else on the server side is openviking-server doctor, run in the server's Python environment.

Step 1 — run the doctor

Run the one command for the host this session runs in:

HostCommand
Claude Code, Codex, OpenCode, pi, DeepSeek Harnessnode <directory of this skill>/../../scripts/ov-memory-doctor.mjs
Cursornode ~/.openviking/agent-integrations/cursor/scripts/ov-memory-doctor.mjs
TRAEnode ~/.openviking/agent-integrations/trae/scripts/ov-memory-doctor.mjs
TRAE CNnode ~/.openviking/agent-integrations/trae-cn/scripts/ov-memory-doctor.mjs
ZCodenode ~/.openviking/agent-integrations/zcode/scripts/ov-memory-doctor.mjs
Antigravitynode ~/.openviking/agent-integrations/antigravity/scripts/ov-memory-doctor.mjs
Kimi Codenode "${KIMI_CODE_HOME:-$HOME/.kimi-code}/plugins/managed/openviking-memory/agent-integrations/kimicode/scripts/ov-memory-doctor.mjs"
CodeBuddy Codenode ~/.openviking/agent-integrations/codebuddy/marketplace/openviking-memory/agent-integrations/codebuddy/scripts/ov-memory-doctor.mjs
Qoder CLInode ~/.openviking/agent-integrations/qoder/marketplace/openviking-memory/agent-integrations/qoder/scripts/ov-memory-doctor.mjs

On the hosts of the first row the doctor ships in the same plugin as this skill, two directories above it; on Claude Code and Codex it hands over to that host's own doctor, which it recognises from the environment (pass claude-code or codex as the first argument if it reports another client). With OPENVIKING_HOME set, the ~/.openviking copies live under it instead. Options: --json (machine-readable), --offline (skip network probes), --timeout <ms> (per probe, default 5000), --no-color.

The report has sections such as Environment, Plugin install, Configuration, Workspace, Connection, Server health and Recent activity, and a Summary listing every ✗/⚠ with a fix. Read the whole report before acting: one root cause usually shows up in several sections (a bad key → "api key rejected" + "system/status → 401").

The API key is never printed in full. Three-segment keys are shown as account=<a> user=<u> secret=abcd…wxyz (the first two segments are base64url identity, decoded so the user can see which account/user the key claims). Other shapes are shown as abcd…wxyz (N chars, unsupported format). Keep it that way in anything you show the user.

Step 2 — map findings to causes

Work top-down; fix the first ✗ and rerun before chasing the next. Findings that only Claude Code or Codex report are in the host sections of reference.md.

Doctor findingMeaningAction
plugin files missing / the shared runtime is not assembled beside this integrationA partial or interrupted install; the first hook dies on a missing module and the host reports nothingRe-run the installer (curl -fsSL https://openviking.ai/install | bash -s -- --harness <client>).
<hooks file> not found / has no OpenViking hooksThe integration was never installed for this host, or the host's config was rewritten without the OpenViking entriesRe-run the installer for this host.
<hooks file> cannot be parsedThe host's config is not valid JSON; the installer refuses to overwrite a file it cannot readFix the JSON with the user, then re-run the installer.
an installed hook names a script that is not on disk / the MCP server points at a proxy that is not on diskThe runtime directory was moved or deleted after installRe-run the installer.
<host> has not loaded this pluginThe plugin is assembled on disk but the host does not list it as installed and enabled. CodeBuddy Code, Qoder CLI: the host CLI was not on PATH at install time, or the plugin was uninstalled or disabled in the host. Kimi Code: its entry in plugins/installed.json is missing or disabledIf the plugin was disabled, re-enable it in the host; the installer keeps that choice. Otherwise re-run the installer, for CodeBuddy Code and Qoder CLI with the host CLI on PATH.
OpenCode does not load this plugin / loads a plugin that is not on diskOpenCode: neither the plugins/openviking.js wrapper nor @openviking/opencode-plugin in the config's plugin list is in place, or the wrapper points at a missing directoryRe-run the installer with --harness opencode.
OpenCode loads this plugin twiceBoth the file wrapper and the npm package are registered, so everything runs twiceRemove @openviking/opencode-plugin from the plugin list, or re-run the installer.
the extension is not installed where pi discovers it / the MCP client dependency is not installedpi: nothing under ~/.pi/agent/extensions/openviking, or its node_modules is incomplete, in which case pi cannot load the extension at allRe-run the installer with --harness pi, or run the npm ci command the finding prints.
pi's settings turn this extension offA - override for the extension in pi's user or project settings.json, as pi config writes when it is switched offTurn it back on in pi config.
no DeepSeek Harness profile … has the plugin / installed in profile <p> but turned off / enables the plugin but has no copy of itDeepSeek Harness loads plugins per profile: the plugin is missing from the profile this session runs, or is off in its Plugins pageRun the dsh plugin --profile <p> add command the finding prints, or turn the plugin on in the Plugins page.
no config outside profile <p>'s cordis.patch.ymlDeepSeek Harness: the connection is set in the profile's patch file, which the doctor does not read, so its connection checks may target another server than the pluginCompare with endpoint and apiKey in that file, or move them to ~/.openviking/ovcli.conf.
ZCode's hook runner is offhooks.enabled is not true in ~/.zcode/cli/config.json, so no hook firesRe-run the installer, or set hooks.enabled = true.
no 'openviking' MCP server / <mcp file> not foundHooks may work, but the OpenViking MCP tools are not wired upRe-run the installer.
the installer wrote no MCP server (info)Antigravity already had an openviking server in ~/.gemini/config/mcp_config.json, and the installer left it as the only oneNothing to fix; MCP findings then concern that server, not the plugin.
the MCP server is tagged for <other client>The proxy reads its configuration under another client's nameRe-run the installer for this host.
skills missing from …A skill was removed, or the installer kept a same-named directory it did not writeRe-run the installer; move the unmanaged directory aside first if the user agrees.
this copy was installed for <other client>The doctor was run from another host's copyRun the command for this host from Step 1.
ovcli.conf cannot be parsed / no usable configTrailing comma/comment; the file is treated as absent and the localhost default appliesFix the JSON. Fresh machine: create ~/.openviking/ovcli.conf with url + api_key, chmod 600.
node is not on PATH / node < 18Hooks and the MCP server run node; GUI launches often lack nvm/volta shimsPut node on PATH for the environment that launches the host.
server unreachable (refused / dns / timeout / tls)Wrong url/port, server down, DNS/VPN, private CACompare with curl -sS <url>/health; curl OK + doctor fails ⇒ proxy or CA issue (Step 3).
base URL ends with /api/v1 or /mcp, no scheme, GET /health → 404url shape wrong; Cloud needs the /openviking prefixFix url to the API root.
/health is authenticated at this deployment (info) / api key rejected on /health → 401OpenViking Cloud gates /health and /ready at the gatewayThe info line needs no fix. The ✗ means the gateway rejected this key: use one issued for that deployment.
api key rejected then system/status → 401 Invalid API KeyKey invalid/revoked/for another deploymentGet the key re-issued; check nothing overrides ovcli.conf ("← env" in the Configuration section).
using the ROOT api key / 403 ROOT API keys cannot access tenant-scoped data APIsapi_key fell through to ov.conf server.root_api_key, or the root key was pastedUse a user/admin key.
server is in trusted mode and needs account + userServer identity comes from headersSet account and user in ovcli.conf.
configured account/user differ from the key's identity / plugin auth mode 'trusted' differs from the server's 'api_key'In api_key mode the server ignores the identity headers; data lands under the key's identityRemove them (or set OPENVIKING_AUTH_MODE=api_key), or use a key for that identity.
request/capture timeout exceeds the hook budgetThe host kills the hook before the request finishesLower the timeout the finding names (OPENVIKING_TIMEOUT_MS, OPENVIKING_RECALL_TIMEOUT_MS, OPENVIKING_CAPTURE_TIMEOUT_MS).
POST /mcp tools/list → 404/406/502/504 while /health is fineReverse proxy not forwarding /mcp, rewriting Accept, or buffering SSEFix the proxy (proxy_buffering off, forward /mcp, pass Authorization).
proxy variables set + curl works but hooks failNode's fetch ignores HTTP(S)_PROXY; no CA handlingNODE_USE_ENV_PROXY=1 or NODE_EXTRA_CA_CERTS=<ca.pem> in the environment that launches the host.
MCP proxy last started against <other url>The proxy is a long-lived process; a changed url only takes effect after a restartRestart the host.
one or more injection paths are switched offOPENVIKING_AUTO_RECALL=0 / OPENVIKING_AUTO_CAPTURE=0 or the matching plugin.<client> settingSwitch it back on if the user did not intend it.
no hook state … yet / no hook log … debug is on but no hook has runThe host is not spawning the hooks at allAn install, registration or node problem, not a server problem.
no session has ever captured a turnThe Stop hook runs but writes failFix the Connection findings; failed writes are queued and replayed at the next session start.
ov.conf has a top-level '<harness>' block / server.url is rejectedPlugin-only keys in the server's own config; the server refuses to start at its next restartMove them to ovcli.conf (plugin.<client>, url) and delete them from ov.conf.
nothing listens on port … — the server is not runningServer down or never startedStart it (openviking-server; first time openviking-server init). Ask before restarting a server the user runs.
/ready: embedding → error …The running server cannot call its embedding provider: recall searches nothing, commits extract nothingFix embedding.* in ov.conf and restart; openviking-server doctor prints the provider's reply.
/ready: vectordb → … / /ready: agfs → …Storage broken: disk full, two servers on one workspace, corrupted indexServer log; stop the duplicate; free disk.
server is still initializing (503 /ready)First start downloads a local embedding model, or init is slowWait and rerun; if it never finishes, read the server log.
docker container is up but has no ov.confOfficial image started without a config mount (every request 503s)Mount ~/.openviking at /app/.openviking, or docker exec -it openviking openviking-server init.

More symptoms, exact error strings, where each piece lives and the per-host notes: reference.md.

Step 3 — targeted checks (only when the report is not conclusive)

Prove hooks run at all: put OPENVIKING_DEBUG=1 in the environment that launches the host, run one turn, then read ~/.openviking/logs/<client>-hooks.log (cc-hooks.log on Claude Code; JSONL; grep "error"). An absent or unchanged log after a full turn means the hooks were not spawned. OpenCode, pi and DeepSeek Harness run in the host's own process and have no hooks log; the Recent activity section names the log each of them writes.

Prove the key and identity by hand (Bearer is case-sensitive with exactly one space):

URL=<url>; KEY=<key>
curl -sS "$URL/health"                                  # reachability, version, auth_mode (401 on Cloud: the gateway gates /health)
curl -sS -H "Authorization: Bearer $KEY" "$URL/health"  # 200 without account_id/user_id/role ⇒ key invalid
curl -sS -w '\n%{http_code}\n' -H "Authorization: Bearer $KEY" "$URL/api/v1/system/status"  # real 401/403

Prove /mcp directly (stateless — no initialize needed):

curl -sS -o /dev/null -w '%{http_code}\n' -X POST "$URL/mcp" \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -H "Authorization: Bearer $KEY" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Prove a capture landed: the OpenViking session id is the host's own session id behind a prefix (cc- Claude Code, cx- Codex, cu- Cursor, tr- TRAE, trcn- TRAE CN, zc- ZCode, ag- Antigravity, kc- Kimi Code, cb- CodeBuddy Code, qd- Qoder CLI), and hook hosts keep session state in ~/.openviking/hook-state/<client>/. GET $URL/api/v1/sessions/<id> (or ov session get <id>) should show the captured messages, and commit_count > 0 proves extraction ran.

Second opinion from the CLI: ov health and ov config validate read the same ~/.openviking/ovcli.conf. ov config list reveals whether a different profile was switched in with ov config switch, which also retargets the integration unless env vars win.

Server side (only meaningful when the server runs on this machine):

curl -sS "$URL/ready"                       # agfs / vectordb / api_key_manager / embedding / ollama
openviking-server doctor                    # in the server's own environment: config, native engine, embedding probe, VLM key, disk
lsof -nP -iTCP:1933 -sTCP:LISTEN            # who owns the port
docker logs --tail 100 openviking           # container deployments

Fixing

  • Edit ~/.openviking/ovcli.conf only with the user's agreement; show the change, keep unknown keys, keep mode 0600, never echo the key.
  • Install problems are fixed by re-running the installer for this host, not by editing the host's hook or MCP configuration by hand. The exceptions, the Claude Code and Codex switches named in reference.md, are edited only for the keys named there.
  • After changing url, installing or updating: restart the host or start a new session. Hooks re-read config per invocation, the MCP proxy does not.
  • Confirm the fix by rerunning the doctor, then by observing an <openviking-context> block on the next prompt.

Documentation

  • Source and issues: https://github.com/volcengine/OpenViking — the integrations live under examples/, the shared installer under examples/memory-plugin-shared/.
  • Documentation index (LLM-friendly): https://docs.openviking.ai/llms.txt; the harness integration pages under it cover install paths, configuration keys and known limitations.
  • https://api.vikingdb.cn-beijing.volces.com/openviking is the Volcengine-hosted OpenViking Service (OpenViking Cloud): the path prefix is part of the base url, it accepts Authorization: Bearer only, and its keys are issued from the Volcengine console rather than by a self-hosted admin.

Rules

  • Never print a full API key or the raw contents of ovcli.conf; the doctor's masked forms are the limit.
  • /health returning 200 proves reachability only. Auth is proven by the identity fields with a key, or by /api/v1/system/status.
  • ov doctor is openviking-server doctor: it validates the server's own config and providers, and says nothing about this integration. Run it for provider-level failures, not first.
  • The doctor only reads. Never stop, restart or kill the user's server, or edit ov.conf, without asking.
  • Older proxy versions say "check that 'ov serve' is running" — there is no such command; the server is started with openviking-server.
Repository

volcengine/OpenViking

Path

examples/agent-hook-plugin/skills/ov-memory-doctor/SKILL.md

Last updated
First committed
Purpose
Security and complianceDebugging and error handlingDevOps
Form
WorkflowReference
Commands
nodecurlbashnpmnpm cidshdsh plugindsh plugin addpipi configovov doctorov healthov configov config validateov config listov config switchov sessionov session getopenviking-serveropenviking-server doctoropenviking-server initgrepchmodkilllsofdockerdocker logsdocker exec
Network origins
https://openviking.ai
Human confirmation
Required before acting

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.