[Question]: openviking: auto-capture completed but extract returned 0 memories and openviking: agent memories search failed: Error: OpenViking request failed [INTERNAL]: Access denied for viking://agent/0f4f36742ab1/memories
Your Question
I execute openclaw-eval local, it keeps appearing “ openviking: auto-capture completed but extract returned 0 memories. Check OpenViking server logs for embedding/extract errors.” and “ openviking: agent memories search failed: Error: OpenViking request failed [INTERNAL]: Access denied for viking://agent/0f4f36742ab1/memories” . Openviking registered context-engine. The detailed log is in txt file.
Context
No response
Code Example (Optional)
Related Area
None
Before Asking
- [x] I have checked the documentation
same
@Joeywzr 这样应该会有效。问题原因是把userid给修改为default了。 /Users/miniconda3/envs/openviking/lib/python3.10/site-packages/openviking/server/routers/system.py 需要改第 111 行和第 120 行,一共两处:
第 111 行,把 _ctx 改成 ctx(去掉下划线,表示要使用这个变量):
改前
_ctx: RequestContext = Depends(get_request_context),
改后
ctx: RequestContext = Depends(get_request_context),
第 120 行,把 service.user._user_id 改成 ctx.user.user_id:
改前
"user": service.user._user_id,
改后
"user": ctx.user.user_id,
同样的问题,查看最新版的代码似乎已经改了,但还是会有这个问题
Confirmed fixed.
Root cause of the Access denied for viking://agent/0f4f36742ab1/memories part was the old OpenClaw plugin namespace routing. Older plugin code derived the agent memory space with a hash-like value such as 0f4f36742ab1 and then searched viking://agent/<hashed-space>/memories. That value did not match the request's effective X-OpenViking-Agent, so server-side access control correctly rejected it.
The fix landed in these PRs:
-
https://github.com/volcengine/OpenViking/pull/1606
- Main fix. Reworked OpenClaw plugin auth/namespace handling and replaced the old space-discovery/hash routing with canonical namespace expansion.
- Agent memory aliases now resolve to the effective agent namespace, for example
viking://agent/<agent_id>/memories, orviking://agent/<agent_id>/user/<user_id>/memorieswhen agent-scope-by-user isolation is enabled.
-
https://github.com/volcengine/OpenViking/pull/1054
- Related prerequisite fix.
/api/v1/system/statusnow returns the request context user (ctx.user.user_id) instead of the process default user. This prevents the plugin from resolving the runtime user asdefaultincorrectly.
- Related prerequisite fix.
-
https://github.com/volcengine/OpenViking/pull/1789
- Follow-up hardening. The plugin no longer synthesizes
X-OpenViking-Account/X-OpenViking-Userasdefault/default; tenant headers are sent only when explicitly configured.
- Follow-up hardening. The plugin no longer synthesizes
-
https://github.com/volcengine/OpenViking/pull/1809
- Follow-up routing fix. Clarified
agent_prefixsemantics and made the fallback OpenClaw agentmain, avoiding agent id drift.
- Follow-up routing fix. Clarified
Current expected behavior:
viking://agent/memoriesfrom the OpenClaw plugin is normalized to the current effective agent namespace before/api/v1/search/find.- Access to another agent namespace still returns permission denied by design.
- The exact hashed path from this issue,
viking://agent/0f4f36742ab1/memories, should no longer be generated by the fixed plugin path.
If anyone still sees this after upgrading, please check that both sides are actually updated:
- OpenViking server includes PR #1054 and #1606 or later.
- OpenClaw plugin includes PR #1606, #1789, and #1809 or later.
- Plugin namespace config matches the server account policy, especially
isolateAgentScopeByUser. - Enable plugin routing diagnostics with
OPENVIKING_LOG_ROUTING=1orOPENVIKING_DEBUG=1and verifyX_OpenViking_Agent,resolved_user_id, andtarget_uriin the logs.
Note: the separate message auto-capture completed but extract returned 0 memories can still happen for model/config reasons, such as embedding or extraction model failures. That is independent from the access-denied routing bug fixed here. If only the 0 memories symptom remains, please open a new issue with the server logs around session commit/extraction.
Closing this as fixed by #1606, with related fixes #1054, #1789, and #1809.