Repository navigation
fix(cli): prevent Windows cmd.exe multiline prompt truncation in watch --execute (#2070) - #2224
Merged
tamirdresher merged 1 commit intoOct 14, 2026
Conversation
Contributor
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 0 active Copilot thread(s) resolved (2 outdated skipped) |
| ❌ | CI passing | 9 check(s) still running |
Files Changed (6 files, +168 −13)
| File | +/− |
|---|---|
.changeset/windows-watch-multiline-prompt.md |
+5 −0 |
packages/squad-cli/src/cli/commands/watch/agent-spawn.ts |
+77 −6 |
packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts |
+1 −0 |
packages/squad-cli/src/cli/commands/watch/index.ts |
+8 −2 |
test/cli/watch-agent-spawn.test.ts |
+63 −0 |
test/cli/watch-capabilities.test.ts |
+14 −5 |
Total: +168 −13
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
🟡 Impact Analysis — PR #2224Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
squad-cli (3 files)
tests (2 files)
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The fallback can still pass unsafe prompts inline, while escapeArgs can leak temporary prompt files.
2 open findings
What changed in this PR
Fixes Windows prompt truncation in watch execution and corrects executed-issue reporting.
Changes:
- Spills multiline/oversized prompts to temporary files on Windows.
- Reports executed counts with backward-compatible dispatch fallback.
- Adds regression tests and a CLI changeset.
| File | Description |
|---|---|
.changeset/windows-watch-multiline-prompt.md |
Documents the patch release. |
packages/squad-cli/src/cli/commands/watch/agent-spawn.ts |
Adds Windows prompt-file handling and cleanup. |
packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts |
Returns the executed count. |
packages/squad-cli/src/cli/commands/watch/index.ts |
Reads executed or dispatched counts. |
test/cli/watch-agent-spawn.test.ts |
Tests Windows argument spilling. |
test/cli/watch-capabilities.test.ts |
Tests execution reporting and Windows paths. |
Review effort: Balanced
Comment on lines
+149
to
+152
| } catch { | ||
| // If temp-file creation fails (e.g. read-only tmpdir), collapse newlines so cmd.exe does not truncate at line 1. | ||
| return arg.replace(/\r?\n+/g, ' '); | ||
| } |
Comment on lines
+186
to
189
| export function escapeArgs(args: string[], isWindows: boolean = IS_WINDOWS): string[] { | ||
| if (!isWindows) return args; | ||
| return args.map(arg => spillPromptArgForCmd(arg)).map(escapeForCmd); | ||
| } |
tamirdresher
force-pushed
the
fix/2070-windows-watch-multiline-prompt
branch
from
October 14, 2026 14:54
4e113bd to
4fae6a3
Compare
…h --execute (github#2070) Closes github#2070 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5cf0811c-a02a-41a7-ab00-904b6900db7b
tamirdresher
force-pushed
the
fix/2070-windows-watch-multiline-prompt
branch
from
October 14, 2026 15:13
4fae6a3 to
cc813fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes two issues in squad watch --execute / squad triage --execute on Windows (#2070):
Validation
Closes #2070