claude-threads 1.38.0 → 1.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.38.1] - 2026-09-24
9
+
10
+ ### Fixed
11
+ - **Sessions start on Windows again** (#600). On Windows the bot spawned the Claude CLI with `shell: true`, which makes Node join the arguments into one cmd.exe command line without escaping them. The `|` in the session context passed as `--append-system-prompt` was read as a pipe, so every session exited with code 255 before Claude answered. Any other shell character in an argument had the same effect, including text from a user's message in the one-shot haiku calls, which made this a command-injection path too. Spawning now goes through the `cross-spawn` package: it runs a native `claude.exe` directly and escapes arguments for cmd.exe when the target is an npm `.cmd` shim. The auto-update installer (which spawned `npm.cmd` without a shell, rejected by Node since 20.12) and the self-respawn after an update use the same path. A new `windows-latest` CI job round-trips shell characters through a real `.cmd` shim, so this path is tested on Windows from now on.
12
+ - **Auto-restart on Windows no longer picks the WSL `bash.exe`** (#600). `bash` on PATH is often the WSL launcher, which runs the daemon script inside Linux, where the Windows paths it gets do not exist. The bot now looks for Git for Windows' bash and starts without auto-restart, with a notice, when there is none. The daemon script also stopped using `eval` to start the bot, which dropped the backslashes from a Windows path and split any path containing a space, on macOS and Linux too.
13
+
8
14
  ## [1.38.0] - 2026-09-24
9
15
 
10
16
  ### Added
package/README.md CHANGED
@@ -59,7 +59,7 @@
59
59
  - **Files both ways** - Drop any file into the chat for Claude to read, with full multimodal for images and PDFs; Claude posts screenshots, plots, or PDFs back with `send_file` (100 MB cap)
60
60
  - **Voice notes** - With `transcription:` configured (ElevenLabs Scribe), an audio clip is transcribed before Claude sees it and the transcript is echoed into the thread; see [Configuration](docs/CONFIGURATION.md#transcription-transcription)
61
61
  - **Quiet mode and verbosity dials** - `!mentions on` makes a session respond only when mentioned; session headers and the channel sticky each have `full`/`minimal`/`hidden` modes
62
- - **Runs on macOS, Linux, and Windows** - Windows via Git Bash or WSL
62
+ - **Runs on macOS, Linux, and Windows** - natively or inside WSL; on native Windows, auto-restart needs Git for Windows' bash
63
63
  - **Auto-update** - The bot watches npm for new versions; `!update now` applies one from chat
64
64
 
65
65
  ## What Claude can do in your chat
@@ -52,12 +52,12 @@ if [ -n "$CLAUDE_THREADS_BIN" ]; then
52
52
  echo "[daemon] Error: node not found in PATH" >&2
53
53
  exit 1
54
54
  fi
55
- CLAUDE_THREADS_CMD="node $CLAUDE_THREADS_BIN"
55
+ CLAUDE_THREADS_CMD=(node "$CLAUDE_THREADS_BIN")
56
56
  else
57
- CLAUDE_THREADS_CMD="$CLAUDE_THREADS_BIN"
57
+ CLAUDE_THREADS_CMD=("$CLAUDE_THREADS_BIN")
58
58
  fi
59
59
  else
60
- CLAUDE_THREADS_CMD="claude-threads"
60
+ CLAUDE_THREADS_CMD=(claude-threads)
61
61
  fi
62
62
 
63
63
  # Track restart count
@@ -115,7 +115,7 @@ log() {
115
115
  }
116
116
 
117
117
  log "Starting claude-threads daemon"
118
- log "Binary: $CLAUDE_THREADS_CMD"
118
+ log "Binary: ${CLAUDE_THREADS_CMD[*]}"
119
119
  log "Max restarts: ${MAX_RESTARTS:-unlimited}"
120
120
  log "Restart delay: ${RESTART_DELAY}s"
121
121
  log "Restart on error: $RESTART_ON_ERROR"
@@ -140,9 +140,10 @@ while true; do
140
140
  log "Starting claude-threads (restart #$restart_count)..."
141
141
 
142
142
  # Run claude-threads with any remaining arguments
143
- # Note: CLAUDE_THREADS_CMD may be "bun /path/to/file.js" so we use eval
143
+ # An array, not eval: eval re-parses the path, dropping the backslashes
144
+ # of a Windows path and splitting one that contains a space (#600).
144
145
  set +e
145
- eval $CLAUDE_THREADS_CMD '"$@"' &
146
+ "${CLAUDE_THREADS_CMD[@]}" "$@" &
146
147
  child_pid=$!
147
148
  wait $child_pid
148
149
  exit_code=$?