Skip to content

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

Rust

test(windows): guard PowerShell hook runners

AkitaOnRailsb3ba963f4b68
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 1f651fbb..675d5afa 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -104,6 +104,7 @@ jobs:
- 'crates/ai-memory-store/**'
- 'crates/ai-memory-hooks/**'
- 'crates/ai-memory-cli/src/commands/install_hooks.rs'
+ - 'crates/ai-memory-cli/src/commands/render_shared.rs'
- 'crates/ai-memory-cli/src/commands/service_host.rs'
- 'crates/ai-memory-cli/src/commands/user_service.rs'
- 'hooks/**'
diff --git a/crates/ai-memory-cli/src/commands/render_shared.rs b/crates/ai-memory-cli/src/commands/render_shared.rs
index af379747..9e6b83b6 100644
--- a/crates/ai-memory-cli/src/commands/render_shared.rs
+++ b/crates/ai-memory-cli/src/commands/render_shared.rs
@@ -2493,6 +2493,17 @@ fn win_double_quote(s: &str) -> String {
format!("\"{}\"", s.replace('"', ""))
}
+#[test]
+fn powershell_call_operator_is_limited_to_known_powershell_runners() {
+ for agent in ["codex", "grok", "copilot-cli", "gemini-cli"] {
+ assert_eq!(powershell_call_operator(agent), "& ", "agent: {agent}");
+ }
+
+ for agent in ["claude-code", "kiro-cli", "opencode", "qwen-code"] {
+ assert_eq!(powershell_call_operator(agent), "", "agent: {agent}");
+ }
+}
+
/// #515: Codex evaluates its Windows hook command with PowerShell, where a
/// quoted path in command position is a string expression rather than an
/// invocation — every hook exited 1 with a ParserError. The call operator