Commit 1255eb2bdc5b

Vincent Demeester <vincent@sbr.pm>
2026-01-12 17:05:39
fix(shpool): set TERM and bypass kitty kitten for shpool sessions
1. Set TERM=xterm-256color in claude-vertex for proper color support 2. Replace zsh ssh alias with function that detects shpool patterns (host/session) and uses raw ssh command instead of kitty kitten The kitty SSH kitten delegation wasn't working properly, causing "Cannot execute command-line and remote command" errors. The function checks if the first argument contains "/" and uses raw ssh for those cases. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c5ccc6e
Changed files (2)
home
common
desktop
tools
shpool-ssh-wrapper
home/common/desktop/kitty.nix
@@ -106,7 +106,16 @@
     '';
   };
 
-  programs.zsh.shellAliases = {
-    ssh = ''kitty +kitten ssh'';
-  };
+  programs.zsh.initExtra = ''
+    # SSH wrapper - use raw ssh for shpool sessions (host/session pattern)
+    # Kitty SSH kitten interferes with RemoteCommand
+    ssh() {
+      # Check if first argument contains / (shpool session pattern)
+      if [[ "$1" =~ / ]]; then
+        command ssh "$@"
+      else
+        kitty +kitten ssh "$@"
+      fi
+    }
+  '';
 }
tools/shpool-ssh-wrapper/default.nix
@@ -7,6 +7,8 @@ let
     export CLAUDE_CODE_USE_VERTEX=1
     export CLOUD_ML_REGION=us-east5
     export ANTHROPIC_VERTEX_PROJECT_ID=itpc-gcp-pnd-pe-eng-claude
+    # Set TERM for proper color support
+    export TERM=xterm-256color
 
     # Directory is required
     if [ -z "''${1:-}" ]; then