Skip to content

fix(ce-coherence-reviewer): remove Bash from tool allowlist#837

Merged
tmchow merged 1 commit into
mainfrom
tmchow/debug-issue-832
May 16, 2026
Merged

fix(ce-coherence-reviewer): remove Bash from tool allowlist#837
tmchow merged 1 commit into
mainfrom
tmchow/debug-issue-832

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented May 16, 2026

Summary

ce-doc-review no longer stalls indefinitely when ce-coherence-reviewer runs on platforms whose bash tool blocks on heredocs. Issue #832 reported 39-88 minute hangs on OpenCode while the reviewer was creating coherence checklist files in /tmp.

The reviewer's task is pure document reasoning — internal consistency, terminology drift, and cross-reference checking over text already passed in its prompt — and never needs shell access. With Bash available and pinned to model: haiku, the agent was externalizing tracking state into temp-file scratchpads. The subagent template's "operationally read-only" prose constraint did not reliably suppress this at the model level, so the deterministic fix is removing the tool from the allowlist.

A pinned frontmatter test prevents Bash from being re-added to ce-coherence-reviewer. The NO_BASH_AGENTS set extends naturally to other pure-document reviewers (ce-design-lens-reviewer, ce-security-lens-reviewer, ce-adversarial-document-reviewer) if the same pattern needs to apply later.

Fixes #832


Compound Engineering
Claude Code

The reviewer's task is pure document reasoning over text already in its
prompt -- internal consistency, terminology drift, cross-references --
and never needs shell access. With Bash available and pinned to model:
haiku, the agent was externalizing tracking state into /tmp scratchpad
files; on OpenCode those bash invocations blocked indefinitely (39-88
minute hangs reported in #832). The subagent template's
"operationally read-only" prose constraint did not reliably suppress
the behavior at the model level, so the deterministic fix is removing
the tool from the allowlist.

A pinned frontmatter test prevents Bash from being re-added to
ce-coherence-reviewer. The NO_BASH_AGENTS set extends naturally to
other pure-document reviewers if needed.

Fixes #832
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 994b69612f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/frontmatter.test.ts
Comment on lines +160 to +161
const tools = parsed && typeof parsed.tools === "string" ? parsed.tools : ""
const toolList = tools.split(",").map((s) => s.trim())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse YAML tool arrays when blocking Bash

The new NO_BASH_AGENTS guard only inspects tools when it is a string, so it silently skips YAML list form (for example tools: [Read, Grep, Glob, Bash]). In that case tools becomes "", toolList is [''], and the test passes even though Bash was reintroduced. This leaves an easy bypass for the regression the test is meant to prevent.

Useful? React with 👍 / 👎.

@tmchow tmchow merged commit 82b8af4 into main May 16, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 16, 2026
LLMpsycho pushed a commit to LLMpsycho/compound-engineering-plugin that referenced this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[compound-engineering] Bug: ce-doc-review can hang indefinitely when coherence-reviewer gets stuck in bash tool

1 participant