Skip to content

Claude review skills fail silently when run via background Task subagent #296

@cderv

Description

@cderv

Something I observed recently so sharing in case I am not the only one


The Claude skills for review commands instruct Claude Code to run the review using the Task tool with run_in_background: true and subagent_type: "Bash". In practice, the background agent completes but produces no usable output, and Claude Code reports it failed.

Reproduction

From a repo with roborev initialized:

/roborev-design-review-branch

Session output:

● Bash(Run branch design review)
  ⎿  Backgrounded agent
  ⎿  Prompt:
       Run this command in the directory C:\Users\chris\Documents\DEV_R\quarto-cli.worktrees\issue-13341:
       roborev review --branch --wait --type design

● Design review submitted for the branch. I'll present the results when it completes — you can keep working in the meantime.

● Agent "Run branch design review" completed

● The background agent wasn't able to run the command. Let me run it directly.

The agent completes and Claude interprets the result as a failure. The actual agent output isn't visible in the session, so the specific failure mode is unclear.

Affected skills

All four Claude review skills contain the same pattern at internal/skills/claude/*/SKILL.md:

Use the `Task` tool with `run_in_background: true` and `subagent_type: "Bash"`:
  • roborev-review/SKILL.md (line 49)
  • roborev-review-branch/SKILL.md (line 49)
  • roborev-design-review/SKILL.md (line 48)
  • roborev-design-review-branch/SKILL.md (line 48)

The Codex versions of these skills run the command synchronously and don't use the background Task pattern, so they may not be affected.

Possible causes

A few things could explain the failure:

  • Background subagents in Claude Code auto-deny tool permissions that weren't pre-approved before launch. If the Bash permission pre-approval doesn't trigger for the roborev review command, it gets silently denied.
  • The --wait flag blocks until the review completes, which could hit a timeout in the background agent before the review finishes.
  • The command could run but return an error (daemon not running, wrong working directory) that the agent doesn't surface.

I don't have visibility into what the background agent actually returned, so I can't narrow it down further.

Ideas

  • The --wait flag combined with a background subagent seems like it could cause timeout issues. The command blocks, the agent blocks, and if the review takes longer than the agent timeout, it fails. Removing --wait would let the enqueue return immediately, avoiding the timeout window.
  • Claude Code's Bash tool supports run_in_background: true natively. Using Bash directly instead of wrapping it in a Task subagent would avoid the subagent permission model entirely — the user approves the command in the foreground, then it runs in the background.

Environment

  • roborev at ebf5478 (main)
  • Claude Code with Claude Opus 4.6
  • Windows 11, though likely not Windows-specific

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions