Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"hooks": [
{
"type": "command",
"command": "npx tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/session_start.ts\"",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/silent-npx.js\" tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/session_start.ts\"",
"timeout": 5
},
{
"type": "command",
"command": "npx tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/sync_letta_memory.ts\"",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/silent-npx.js\" tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/sync_letta_memory.ts\"",
"timeout": 10
}
]
Expand All @@ -23,7 +23,7 @@
"hooks": [
{
"type": "command",
"command": "npx tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/pretool_sync.ts\"",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/silent-npx.js\" tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/pretool_sync.ts\"",
"timeout": 5
}
]
Expand All @@ -35,7 +35,7 @@
"hooks": [
{
"type": "command",
"command": "npx tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/sync_letta_memory.ts\"",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/silent-npx.js\" tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/sync_letta_memory.ts\"",
"timeout": 10
}
]
Expand All @@ -47,7 +47,7 @@
"hooks": [
{
"type": "command",
"command": "npx tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/send_messages_to_letta.ts\"",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/silent-npx.js\" tsx \"${CLAUDE_PLUGIN_ROOT}/scripts/send_messages_to_letta.ts\"",
"timeout": 15
}
]
Expand Down
23 changes: 23 additions & 0 deletions hooks/silent-npx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env node
const { spawn } = require('child_process');

// Detect platform
const isWindows = process.platform === 'win32';

// Run npx with the remaining arguments
const child = spawn('npx', process.argv.slice(2), {
windowsHide: isWindows, // Hide console window on Windows only
stdio: 'inherit', // Pass through stdout/stderr
shell: isWindows // Use shell on Windows to resolve npx.cmd
});

// Forward exit code
child.on('exit', (code) => {
process.exit(code || 0);
});

// Handle errors
child.on('error', (err) => {
console.error('Failed to start subprocess:', err);
process.exit(1);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claude-subconscious",
"version": "1.3.0",
"version": "1.3.1",
"description": "A subconscious for Claude Code. A Letta agent watches your sessions, accumulates context, and whispers guidance back.",
"author": "Letta <hello@letta.com> (https://letta.com)",
"license": "MIT",
Expand Down