Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
fix(setup): read the Finish request body before answering
AkitaOnRailseef73f0d56c4
diff --git a/crates/ai-memory-cli/src/commands/setup_web.rs b/crates/ai-memory-cli/src/commands/setup_web.rsindex 3a2d5145..bfa6d8af 100644--- a/crates/ai-memory-cli/src/commands/setup_web.rs+++ b/crates/ai-memory-cli/src/commands/setup_web.rs@@ -475,7 +475,10 @@ async fn stdin_closed(mut input: impl tokio::io::AsyncRead + Unpin) {while matches!(input.read(&mut buffer).await, Ok(read) if read > 0) {}}-async fn finish(State(wizard): State<Arc<Wizard>>) -> Response {+// The page posts `{}` here. Taking the body reads it off the socket: a+// response sent with the request body still unread, on a connection that then+// closes, can reach the client as a TCP reset instead of the response.+async fn finish(State(wizard): State<Arc<Wizard>>, _body: axum::body::Bytes) -> Response {{let run = wizard.run.lock();if run.started && !run.done {