Skip to content

Terminal tool zsh failures #316129

@roblourens

Description

@roblourens

Here's a list of terminal tool failures in my chat sessions from writing bad zsh commands, because the model isn't trained on working in a real shell environment.

Most common ones that I've noticed seeing:

  • using ! incorrectly, eg echo "hello!" is an incorrect use of !, and this will hang on dquote>
  • zsh: command not found: #
  • Incorrect use of ==, eg:
## Request
~~~
id   : toolu_vrtx_01SWtUxMk2tNJW69APCybBo6__vscode-1778605228075
tool : run_in_terminal
args : {
  "command": "cat .planning/config.json 2>/dev/null; echo ===; git log --oneline 4047ede..HEAD | wc -l; git log --format='%ai' 4047ede | tail -1; git log --format='%ai' HEAD | head -1; git diff --stat 4047ede..HEAD | tail -1; find src tests -name '*.ts' | xargs wc -l | tail -1",
  "explanation": "Gather stats",
  "goal": "Stats",
  "mode": "sync"
}
~~~
## Response
~~~
{
  "mode": "yolo",
  "granularity": "coarse",
  "parallelization": true,
  "commit_docs": true,
  "model_profile": "quality",
  "git": {
    "branching_strategy": "phase",
    "phase_branch_template": "phase-{phase}-{slug}"
  },
  "workflow": {
    "research": true,
    "plan_check": true,
    "verifier": true,
    "nyquist_validation": true
  }
}zsh: == not found

Full list that were detected in my vscode chat sessions:

Category Pattern
Bad substitution JS/template/string snippets in double quotes caused zsh expansion, e.g. zsh: bad substitution.
Comment lines executed # ... lines were sent to interactive zsh, producing zsh: command not found: #; comments with parentheses produced unknown file attribute / invalid mode specification.
Unmatched globs zsh nomatch turned missing globs into failures before redirection, e.g. zsh: no matches found: *.md.
Read-only status variable Commands used status=$?; zsh has status as a read-only special parameter.
Bare == / === separators echo ===, echo ==== $f, echo ===TAIL=== triggered zsh equals expansion, e.g. zsh: === not found.
Multiword command in scalar variable DAP="node path/to/file.js"; $DAP ... failed because zsh does not split scalar variables like bash.
Missing timeout GNU timeout assumed on macOS: zsh: command not found: timeout.
Bad timeout substitute perl -e 'alarm 3; exec @ARGV' ... was attempted but produced zsh: alarm perl ....
Argument list too long Huge JSON/string args sent inline: zsh: argument list too long: node.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugchat-terminalThe run in terminal tool in chat

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions