Skip to content

Reject non-string content/old_text without crashing - #79356

Closed
aydnOktay wants to merge 1 commit into
NousResearch:mainfrom
aydnOktay:fix/memory-tool-nonstrings-content
Closed

Reject non-string content/old_text without crashing#79356
aydnOktay wants to merge 1 commit into
NousResearch:mainfrom
aydnOktay:fix/memory-tool-nonstrings-content

Conversation

@aydnOktay

Copy link
Copy Markdown
Contributor

Summary

  • MemoryStore.add / replace / remove and apply_batch called .strip() on raw model args.
  • Strict providers sometimes send int/list fillers for string fields; that raises AttributeError mid-tool instead of a clean error.
  • target: null was already handled in memory_tool; extend the same defensive posture to content / old_text (require real strings; null still means empty).

Strict providers sometimes send int/list fillers for optional string fields.
MemoryStore.add/replace/remove and apply_batch called .strip() on those values
and AttributeError'd mid-tool. Require real strings (null still means empty).

Co-authored-by: Cursor <cursoragent@cursor.com>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/memory Memory tool and memory providers sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Aug 5, 2026
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

@aydnOktay aydnOktay closed this Aug 19, 2026
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

1 similar comment
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants