Skip to content

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

Rust

fix(install-hooks): hide the remote-identity git spawn on Windows

Renato Mosellid17f2bfe33cd
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b43a8edc..67781b77 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
+- Fixed generated TypeScript integrations (OpenCode, OpenCode 2, OMP,
+ Pi, OpenClaw) flashing a console window on Windows.
+ `discoverRemoteIdentity` spawned `git config --get remote.<name>.url`
+ without `windowsHide`. The spawn now passes `windowsHide: true`, as
+ the repo-root probe's two git spawns already do.
- Fixed Cursor tool calls being stored with no title or content: Cursor's own
hooks, and the Claude Code hooks Cursor also runs, send Claude's
`tool_name`/`tool_input` fields, but Cursor was missing from the tool-capture
diff --git a/crates/ai-memory-cli/src/commands/install_hooks.rs b/crates/ai-memory-cli/src/commands/install_hooks.rs
index ed236460..e4357daa 100644
--- a/crates/ai-memory-cli/src/commands/install_hooks.rs
+++ b/crates/ai-memory-cli/src/commands/install_hooks.rs
@@ -4314,6 +4314,7 @@ function discoverRemoteIdentity(cwd: string | undefined): string | undefined {
const remote = execFileSync("git", ["-C", cwd, "config", "--get", `remote.${name}.url`], {
encoding: "utf8",
stdio: ["ignore", "pipe", "ignore"],
+ windowsHide: true,
});
const identity = normalizeRemote(remote);
if (identity) return identity;
@@ -10257,7 +10258,7 @@ model = "gpt-5"
assert!(plugin.contains("boundary ??= dir;"));
assert!(plugin.contains("function repoRootProject"));
assert!(plugin.contains("repoProjectCache.set(cwd, project);"));
- assert_eq!(plugin.matches("windowsHide: true").count(), 2);
+ assert_eq!(plugin.matches("windowsHide: true").count(), 3);
assert!(plugin.contains("--git-common-dir"));
assert!(
plugin
@@ -10688,7 +10689,7 @@ model = "gpt-5"
assert!(extension.contains("import { execFileSync } from \"node:child_process\";"));
assert!(extension.contains("function repoRootProject"));
assert!(extension.contains("repoProjectCache.set(cwd, project);"));
- assert_eq!(extension.matches("windowsHide: true").count(), 2);
+ assert_eq!(extension.matches("windowsHide: true").count(), 3);
assert!(extension.contains("--git-common-dir"));
assert!(
extension
@@ -11420,7 +11421,7 @@ model = "gpt-5"
assert!(extension.contains("import { execFileSync } from \"node:child_process\";"));
assert!(!extension.contains(".omp"));
assert!(extension.contains("repoProjectCache.set(cwd, project);"));
- assert_eq!(extension.matches("windowsHide: true").count(), 2);
+ assert_eq!(extension.matches("windowsHide: true").count(), 3);
assert!(!extension.contains("serve --transport stdio"));
assert!(!extension.contains("serve --stdio"));
// #676: the pi string-transform (api.on( -> pi.on() must still
diff --git a/crates/ai-memory-cli/src/commands/openclaw_plugin.rs b/crates/ai-memory-cli/src/commands/openclaw_plugin.rs
index 1491520f..4570af44 100644
--- a/crates/ai-memory-cli/src/commands/openclaw_plugin.rs
+++ b/crates/ai-memory-cli/src/commands/openclaw_plugin.rs
@@ -587,7 +587,7 @@ mod tests {
assert!(plugin.contains("boundary ??= dir;"));
assert!(plugin.contains("function repoRootProject"));
assert!(plugin.contains("repoProjectCache.set(cwd, project);"));
- assert_eq!(plugin.matches("windowsHide: true").count(), 2);
+ assert_eq!(plugin.matches("windowsHide: true").count(), 3);
assert!(plugin.contains("--git-common-dir"));
assert!(
plugin