Skip to content

Commit c50d786

Browse files
ZaynJarvisclaude
andauthored
fix(cli): return OK for add-memory since commit is async (#1613)
The add-memory command previously read memories_extracted from the commit response, but commit runs asynchronously — the extraction count is not meaningful at response time. Return a simple "OK" instead. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0472b65 commit c50d786

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

crates/ov_cli/src/commands/session.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,11 @@ pub async fn add_memory(
176176
let _: serde_json::Value = client.post(&path, &body).await?;
177177
}
178178

179-
// 3. Commit
179+
// 3. Commit (async — don't read response)
180180
let commit_path = format!("/api/v1/sessions/{}/commit", url_encode(session_id));
181-
let commit_response: serde_json::Value = client.post(&commit_path, &json!({})).await?;
181+
let _: serde_json::Value = client.post(&commit_path, &json!({})).await?;
182182

183-
// Extract memories count from commit response
184-
let memories_extracted = commit_response["memories_extracted"].as_i64().unwrap_or(0);
185-
186-
let result = json!({
187-
"memories_extracted": memories_extracted
188-
});
189-
output_success(&result, output_format, compact);
183+
output_success(&json!("OK"), output_format, compact);
190184
Ok(())
191185
}
192186

0 commit comments

Comments
 (0)