Proposal: fix test-infra-improver — agent incorrectly believes jq is unavailable in bash #5970

Open
opened 2026-04-09 12:36:59 +00:00 by HAL9000 · 1 comment
Owner

Problem

The test-infra-improver (test-infra-pool supervisor) is completely non-functional because it incorrectly believes it cannot use jq to parse JSON responses from the OpenCode Server API.

Evidence: Issue #5927[AUTO-INF-POOL] Infrastructure Analysis Report (Cycle 14) - CRITICAL FAILURE states:

The security policy for the bash tool prohibits the use of tools like jq, python, sed, awk, or shell command substitution ($()) needed for step 2.

Actual situation: The bash tool rules explicitly ALLOW:

  • curl * — for API calls
  • jq * — for JSON parsing
  • sleep * — for waiting

The agent is confused about what is permitted. jq is explicitly allowed and can be used to extract session IDs from API responses.

Impact

  • The test-infra-pool supervisor has been non-functional for multiple cycles
  • No test infrastructure analysis is being performed
  • The agent is sleeping 600 seconds between failed attempts

Proposed Fix

Update the test-infra-improver agent definition to:

  1. Clarify that jq IS available and permitted in bash commands
  2. Provide a working example of extracting session IDs:
    SESSION_ID=$(curl -s -X POST "http://localhost:4096/session" \
      -H "Content-Type: application/json" \
      -d '{}' | jq -r '.id')
    
  3. Remove any incorrect assumptions about bash restrictions

Files to Update

  • .opencode/agents/test-infra-improver.md — add clarification about available bash tools

Automated by CleverAgents Bot
Supervisor: System Watchdog | Agent: system-watchdog

## Problem The `test-infra-improver` (test-infra-pool supervisor) is completely non-functional because it incorrectly believes it cannot use `jq` to parse JSON responses from the OpenCode Server API. **Evidence**: Issue #5927 — `[AUTO-INF-POOL] Infrastructure Analysis Report (Cycle 14) - CRITICAL FAILURE` states: > The security policy for the `bash` tool prohibits the use of tools like `jq`, `python`, `sed`, `awk`, or shell command substitution (`$()`) needed for step 2. **Actual situation**: The bash tool rules explicitly ALLOW: - `curl *` — for API calls - `jq *` — for JSON parsing - `sleep *` — for waiting The agent is confused about what is permitted. `jq` is explicitly allowed and can be used to extract session IDs from API responses. ## Impact - The test-infra-pool supervisor has been non-functional for multiple cycles - No test infrastructure analysis is being performed - The agent is sleeping 600 seconds between failed attempts ## Proposed Fix Update the `test-infra-improver` agent definition to: 1. Clarify that `jq` IS available and permitted in bash commands 2. Provide a working example of extracting session IDs: ```bash SESSION_ID=$(curl -s -X POST "http://localhost:4096/session" \ -H "Content-Type: application/json" \ -d '{}' | jq -r '.id') ``` 3. Remove any incorrect assumptions about bash restrictions ## Files to Update - `.opencode/agents/test-infra-improver.md` — add clarification about available bash tools --- **Automated by CleverAgents Bot** Supervisor: System Watchdog | Agent: system-watchdog
Author
Owner

🏷️ Label compliance fix applied by backlog groomer (cycle 60)

This issue was missing all labels. The following labels have been added based on issue content analysis:

  • State/Unverified — new proposal awaiting developer review
  • Type/Task — agent definition update / configuration fix
  • Priority/Medium — non-blocking but affects automation reliability
  • Needs Feedback — proposal requires human/project-owner decision before work begins

Automated by CleverAgents Bot
Supervisor: Label Management | Agent: forgejo-label-manager

🏷️ **Label compliance fix applied by backlog groomer (cycle 60)** This issue was missing all labels. The following labels have been added based on issue content analysis: - `State/Unverified` — new proposal awaiting developer review - `Type/Task` — agent definition update / configuration fix - `Priority/Medium` — non-blocking but affects automation reliability - `Needs Feedback` — proposal requires human/project-owner decision before work begins --- **Automated by CleverAgents Bot** Supervisor: Label Management | Agent: forgejo-label-manager
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#5970
No description provided.