Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #91
bash -i -c "nvm --version" was interpreted as bash -i -c nvm --version, and executed inside bash, instead of directlyThis reverts commit 82af3d4.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
The issue is not resolved, check my feedback at: #91 (comment) We need to ensure all changes are correct, consistent, validated, tested, logged and fully meet all discussed requirements (check issue description and all comments in issue and in pull request). Ensure all CI/CD checks pass. |
|
🤖 AI Work Session Started Starting automated work session at 2026-03-13T15:42:52.178Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
…t (issue #91) Add buildDisplayCommand() helper that quotes -c script arguments containing spaces so the displayed command accurately reflects how it was interpreted. Also export the helper and add 6 regression tests for the display behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed the remaining display issue from your feedback. What was wrong: Even after the execution fix in v0.24.6, the command was still displayed as: Root cause: Fix: Added Result: The output now correctly shows: 6 new regression tests added for the display behavior, all 37 tests pass. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (attempt 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
…issue #91) Extracted SHELL_NAMES, isInteractiveShellCommand, isShellInvocationWithArgs, buildShellWithArgsCmdArgs, and buildDisplayCommand from isolation.js into a new shell-utils.js module to keep isolation.js under the 1000-line CI limit (984 lines after extraction, down from 1009). Added changeset file for the patch release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Fixes #91
Root Cause
Bug 1 — Quote stripping / wrong script argument: `args-parser.js` calls `commandArgs.join(' ')` to build a command string. When the user ran `--isolated docker --image konard/sandbox -- bash -i -c "nvm --version"`, the shell stripped quotes so `process.argv` contained `['bash', '-i', '-c', 'nvm --version']`. But `join(' ')` produced `bash -i -c nvm --version` — a flat string where the boundary between `nvm` and `--version` is lost.
Bug 2 — Double-wrapping: `isInteractiveShellCommand()` (added for issue #84) returns `false` for any command including `-c`. So the else-branch fired and wrapped it again: `['/bin/bash', '-i', '-c', 'bash -i -c nvm --version']` → Docker ran `/bin/bash -i -c "bash -i -c nvm --version"`.
Bug 3 — Misleading display: Even after the execution was fixed, the command was still displayed as `$ bash -i -c nvm --version` (without quotes), giving the user inaccurate feedback on how their command was interpreted.
Fix (in `js/src/lib/isolation.js`)
Three helpers added:
The branch logic in `runInDocker()` attached mode:
```js
if (isBareShell) {
// issue #84 fix (bare shell, no -c)
} else if (isShellInvocationWithArgs(command)) {
attachedCmdArgs = buildShellWithArgsCmdArgs(command); // issue #91 fix
} else {
attachedCmdArgs = [...shellCmdArgs, '-c', command]; // non-shell commands unchanged
}
```
The display line now shows:
instead of the misleading:
A full regression test suite is in `js/test/regression-91.test.js` (37 tests, all pass).