Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(mcp): answer an exhausted auto-improve queue with invalid params

Rudy Mizrahi Celekli9014339c314f
diff --git a/crates/ai-memory-mcp/src/server.rs b/crates/ai-memory-mcp/src/server.rs
index 712e1edc..2231385b 100644
--- a/crates/ai-memory-mcp/src/server.rs
+++ b/crates/ai-memory-mcp/src/server.rs
@@ -4233,7 +4233,7 @@ impl AiMemoryServer {
.await
.map_err(|e| McpError::internal_error(e.to_string(), None))?
.ok_or_else(|| {
- McpError::internal_error(
+ McpError::invalid_params(
"no completed session without an auto-improvement run found for the resolved project; pass session_id to rerun a specific session",
None,
)
@@ -20944,6 +20944,11 @@ mod tests {
err.to_string().contains("no completed session without"),
"the exhausted queue should explain how to rerun: {err}"
);
+ assert_eq!(
+ err.code,
+ rmcp::model::ErrorCode::INVALID_PARAMS,
+ "an exhausted implicit queue is the caller's to fix, as in memory_consolidate: {err}"
+ );
let explicit = call_tool_json(
server