fix: pass OpenCode prompt via stdin to avoid Windows shell interpretation#159
fix: pass OpenCode prompt via stdin to avoid Windows shell interpretation#159
Conversation
…tion On Windows with shell: true, special characters in prompts (&, |, >, etc.) were being interpreted by cmd.exe when passed as command-line arguments, causing "syntax of the command is incorrect" errors. Solution: Pass the prompt via stdin instead of CLI args, matching the pattern already used by the Claude agent. This bypasses shell interpretation entirely since stdin data goes directly to the process. Also removes .beads/ from git tracking (local issue tracker). Fixes #148
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughConfiguration and documentation files are being removed from the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
==========================================
+ Coverage 40.71% 40.87% +0.16%
==========================================
Files 72 72
Lines 19906 19912 +6
==========================================
+ Hits 8105 8140 +35
+ Misses 11801 11772 -29
🚀 New features to boost your workflow:
|
Also removes examples/ folder from git tracking (already in .gitignore).
Tests verify that: - buildArgs() does NOT include the prompt (passed via stdin instead) - getStdinInput() returns the prompt unchanged - Special characters (&, |, >, ") are safely handled via stdin - Unicode and newline characters pass through correctly These tests cover the Windows shell interpretation fix from the previous commit.
Move prompt from command-line arguments to stdin for gemini, codex, and kiro agents. This avoids shell interpretation issues with special characters (&, |, >, etc.) on Windows where shell: true is required. Follows the same pattern established in PR subsy#159 for OpenCode.
…ion-148 fix: pass OpenCode prompt via stdin to avoid Windows shell interpretation
Move prompt from command-line arguments to stdin for gemini, codex, and kiro agents. This avoids shell interpretation issues with special characters (&, |, >, etc.) on Windows where shell: true is required. Follows the same pattern established in PR subsy#159 for OpenCode.
Summary
&,|,>,", etc.) in user prompts caused "syntax of the command is incorrect" errors.beads/folder from git tracking (local issue tracker should not be committed)Root Cause
On Windows with
shell: true, the prompt was passed as a command-line argument which gets interpreted by cmd.exe before reaching the OpenCode CLI. Characters like&are treated as command separators.Solution
Override
getStdinInput()in the OpenCode agent to return the prompt, which gets written directly to the spawned process's stdin stream. This bypasses shell interpretation entirely since stdin data goes directly to the process without touching the shell.Test plan
Fixes #148
Summary by CodeRabbit
Chores
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.