hermes - ✅(Solved) Fix OpenViking DELETE /api/v1/fs returns 500 for resources in transient state [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#12791Fetched 2026-04-20 12:16:56
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×1cross-referenced ×1

Error Message

OpenViking DELETE /api/v1/fs returns 500 Internal Server Error for resources that are still being asynchronously processed (isDir status not yet resolved), even when the delete actually succeeds server-side.

  • Return a proper error code (e.g., 409 Conflict) when the resource is in a transient state

Fix Action

Fix / Workaround

Additional context

  • This is a server-side issue, not a plugin bug
  • The plugin tool viking_delete_resource is correctly implemented
  • Workaround: wait for async processing to complete before deleting

PR fix notes

PR #12792: feat(openviking): add viking_delete_resource tool and extend viking_add_resource with local file upload

Description (problem / solution / changelog)

Summary

Two new capabilities for the OpenViking memory plugin:

1. tool (new)

Adds ability to delete resources (files and directories) from the OpenViking knowledge base via .

Parameters:

  • (required): Target viking:// URI
  • : Delete directory and contents (default: False)

2. with local file support (extended)

The existing tool is extended to support local file upload via a two-step temp_upload flow:

New parameters:

  • : Local file path — automatically uses then with the returned
  • : Target viking:// URI for the resource
  • : Parent directory URI (mutually exclusive with )
  • : Wait for async processing to complete
  • : Timeout in seconds for

This enables batch ingestion of local markdown folders, which was not previously possible.

Verification

  • Both tools registered in
  • Lint passes:

Fixes #12791

Changed files

  • plugins/memory/openviking/__init__.py (modified, +148/-12)
RAW_BUFFERClick to expand / collapse

Bug description

OpenViking DELETE /api/v1/fs returns 500 Internal Server Error for resources that are still being asynchronously processed (isDir status not yet resolved), even when the delete actually succeeds server-side.

Steps to reproduce

  1. Upload a new resource via POST /api/v1/resources with wait=False (default)
  2. Immediately try to delete it via DELETE /api/v1/fs?uri=viking://...\&recursive=true
  3. Server returns 500 but the resource may already be deleted

Expected behavior

Server should either:

  • Return 200 even when the resource is deleted server-side (consistent behavior), OR
  • Return a proper error code (e.g., 409 Conflict) when the resource is in a transient state

Additional context

  • This is a server-side issue, not a plugin bug
  • The plugin tool viking_delete_resource is correctly implemented
  • Workaround: wait for async processing to complete before deleting

extent analysis

TL;DR

Implement a check for the asynchronous processing status before returning a response for the DELETE /api/v1/fs request to handle resources that are still being processed.

Guidance

  • Verify the current implementation of the DELETE /api/v1/fs endpoint to understand how it handles asynchronous processing of resources.
  • Consider introducing a mechanism to check the status of the resource being deleted, such as polling or using a callback, to ensure it is not in a transient state.
  • Evaluate the feasibility of returning a 409 Conflict error when the resource is in an asynchronous processing state, as an alternative to the current 500 Internal Server Error.
  • Review the wait=False parameter in the POST /api/v1/resources request to determine if it can be leveraged to wait for the asynchronous processing to complete before attempting to delete the resource.

Example

No code example is provided due to the lack of specific implementation details in the issue description.

Notes

The provided workaround of waiting for async processing to complete before deleting may not be suitable for all use cases, and a more robust solution should be explored.

Recommendation

Apply a workaround by waiting for async processing to complete before deleting resources, as this approach is explicitly mentioned in the issue and can provide a temporary solution until a more permanent fix is implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Server should either:

  • Return 200 even when the resource is deleted server-side (consistent behavior), OR
  • Return a proper error code (e.g., 409 Conflict) when the resource is in a transient state

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING