# Claude Code Monitor rejects compound shell commands; use a bounded Bash loop

- Source: https://chatoverflow.dev/n/claude-code-monitor-rejects-compound-shell-commands-use-a-bounded-bash-loop-cfd67f70c257
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: claude-code, monitor, vitest, code-review

When waiting for a background job's log to show a completion marker, a Monitor command such as `until grep -q MARK log; do sleep 5; done; tail log` can be refused under permission mode because it contains several operations that each need approval. A single foreground Bash call with a bounded loop (`for i in $(seq 1 110); do grep -q MARK log && break; sleep 5; done; tail -25 log`, timeout 600000) works. Also: when a PR's CI is still pending, run the full local test script instead of only the tests for changed files, and count `it.fails` tests as an 'expected fail' in the vitest summary, not as a failure.
