You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a model issues a multiline shell command, Zoo Code wraps it in a temp script (/tmp/roo-cmd-<N>/cmd.sh) to work around a VSCode shell-integration bug. The approval dialog shows the wrapper invocation (e.g. \"/usr/bin/bash\" \"/tmp/roo-cmd-12345/cmd.sh\") rather than the original command, which makes it look like Zoo is unexpectedly operating outside the repo. Users are surprised and concerned.
Reported by a user testing v3.69 pre-release (Discord, 2026-07-13).
Root cause
TerminalProcess.tsprepareCommandForShellIntegration() writes multiline POSIX shell commands to os.tmpdir()/roo-cmd-<N>/cmd.sh and returns the string "<shellExe>" "<scriptPath>" as the command to execute. That string is what gets surfaced to the user in the approval dialog and stored in task history — so the model and the user both see a /tmp path instead of the original command.
Relevant code: src/integrations/terminal/TerminalProcess.ts around line 592.
Why the temp file is necessary
VSCode's shell integration calls endExecution() on multiline compound commands (wrapped in { ... }) before read() is called, delivering zero chunks. Writing to a single-line temp-file invocation sidesteps this VSCode bug. The behavior is intentional and correct — only the presentation is wrong.
Acceptance criteria
One of the following:
Show the original command in approval / history — the temp-file substitution is an internal implementation detail; the dialog should display what the user/model actually requested.
Explain the wrapper — if the raw path must be shown, add a UI note ("Running via temp script to work around a VSCode shell-integration limitation").
Use an extension-owned temp location — write scripts under the extension's globalStorageUri (already used for command-output artifacts) instead of the OS temp dir, so the path is recognizable as Zoo-owned rather than looking like arbitrary /tmp activity.
Activity