Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
test(opencode): pin the parent record from session.updated
João Matheusffe0caf870c1
diff --git a/crates/ai-memory-cli/src/commands/install_hooks.rs b/crates/ai-memory-cli/src/commands/install_hooks.rsindex 8e9e8687..78b2ad99 100644--- a/crates/ai-memory-cli/src/commands/install_hooks.rs+++ b/crates/ai-memory-cli/src/commands/install_hooks.rs@@ -13144,6 +13144,15 @@ model = "gpt-5"assert!(plugin.contains(r#"if (id && typeof parentID === "string" && parentID) sessionParents.set(id, parentID);"#));+ // A child the task tool resumes by `task_id` in a later process is+ // recognized from the `session.updated` its prompt publishes. An+ // update never starts a session of its own.+ let updated = opencode_event_branch(&plugin, "session.updated");+ assert!(+ updated.contains("rememberParent(properties.sessionID ?? info.id, info.parentID);"),+ "{updated}"+ );+ assert!(!updated.contains("startSession("), "{updated}");let transform = &plugin[plugin.find(r#""experimental.chat.system.transform": async"#).expect("system transform hook")..];