Proposal: fix ca-bug-hunter — add missing git clone permission for Worker Mode #3093

Open
opened 2026-04-05 05:57:52 +00:00 by freemo · 7 comments
Owner

Agent Improvement Proposal (REVISED — Clone Isolation Restored per CTO feedback)

Pattern Detected

Type: prompt_improvement
Affected Agent: bug-hunter
Evidence: Bug hunter pool completely blocked — all workers failing because they cannot switch branches safely when analyzing code from working pull requests.

CTO Feedback History

  1. 2026-04-05 @freemo: "They should only need permission to clone if they are going to run the software. For reading the source code only they can just read from the local working directory."

    • Previous revision: removed clone permission, used local /app directory
  2. 2026-04-08 @freemo (updated direction): "Let's backtrack on my last comment and give the worker the ability to clone git into /tmp following the same rules as other agents (like it must clean up its repo after). This is because it may need to switch branches when reading from the repo and we can't safely do that locally."

Final direction: Bug hunter workers must clone into /tmp with cleanup, because they may need to switch branches (e.g., to analyze code from a working PR branch). Multiple workers reading from the same local /app directory would conflict when switching branches.

Proposed Change

Modify bug-hunter.md Worker Mode to:

  1. Add Clone Isolation Protocol — Workers clone the repository into /tmp/bug-hunter-<module> before analysis.

  2. Worker Mode instructions (updated):

    ## Worker Mode (max_workers = 1 or single module assigned)
    
    You analyze source code by cloning the repository into a temporary directory.
    
    1. Clone the repository: git clone <repo_url> /tmp/bug-hunter-<module>
    2. If analyzing a PR branch: git checkout <branch>
    3. Perform your analysis using Read, Grep, and Glob tools
    4. MANDATORY cleanup: rm -rf /tmp/bug-hunter-<module> when done
    
    This isolation ensures multiple workers can safely switch branches without conflict.
    
  3. Add git clone* permission to the worker's allowed commands list.

  4. Cleanup requirement: Workers MUST delete their clone directory after analysis completes (success or failure).

Expected Impact

  • Bug hunter workers can safely analyze code from any branch, including working PR branches
  • Multiple workers can run in parallel without branch-switching conflicts
  • Consistent with the Clone Isolation Protocol used by other agents (e.g., uat-tester)

Risk Assessment

  • Low risk: Clone is read-only analysis; cleanup is mandatory
  • Consistent with existing patterns: Other agents (uat-tester, repo-isolator) already use this pattern
  • Temporary storage: /tmp is cleaned up after each worker session

This is a proposal from the agent evolver, revised per CTO feedback (2026-04-08). @freemo — the description has been updated to reflect your final direction (clone isolation restored). Ready for your review.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison

## Agent Improvement Proposal (REVISED — Clone Isolation Restored per CTO feedback) ### Pattern Detected **Type**: prompt_improvement **Affected Agent**: `bug-hunter` **Evidence**: Bug hunter pool completely blocked — all workers failing because they cannot switch branches safely when analyzing code from working pull requests. ### CTO Feedback History 1. **2026-04-05** @freemo: "They should only need permission to clone if they are going to run the software. For reading the source code only they can just read from the local working directory." - *Previous revision: removed clone permission, used local `/app` directory* 2. **2026-04-08** @freemo (updated direction): "Let's backtrack on my last comment and give the worker the ability to clone git into `/tmp` following the same rules as other agents (like it must clean up its repo after). This is because it may need to switch branches when reading from the repo and we can't safely do that locally." **Final direction**: Bug hunter workers must clone into `/tmp` with cleanup, because they may need to switch branches (e.g., to analyze code from a working PR branch). Multiple workers reading from the same local `/app` directory would conflict when switching branches. ### Proposed Change Modify `bug-hunter.md` Worker Mode to: 1. **Add Clone Isolation Protocol** — Workers clone the repository into `/tmp/bug-hunter-<module>` before analysis. 2. **Worker Mode instructions** (updated): ``` ## Worker Mode (max_workers = 1 or single module assigned) You analyze source code by cloning the repository into a temporary directory. 1. Clone the repository: git clone <repo_url> /tmp/bug-hunter-<module> 2. If analyzing a PR branch: git checkout <branch> 3. Perform your analysis using Read, Grep, and Glob tools 4. MANDATORY cleanup: rm -rf /tmp/bug-hunter-<module> when done This isolation ensures multiple workers can safely switch branches without conflict. ``` 3. **Add `git clone*` permission** to the worker's allowed commands list. 4. **Cleanup requirement**: Workers MUST delete their clone directory after analysis completes (success or failure). ### Expected Impact - Bug hunter workers can safely analyze code from any branch, including working PR branches - Multiple workers can run in parallel without branch-switching conflicts - Consistent with the Clone Isolation Protocol used by other agents (e.g., `uat-tester`) ### Risk Assessment - **Low risk**: Clone is read-only analysis; cleanup is mandatory - **Consistent with existing patterns**: Other agents (uat-tester, repo-isolator) already use this pattern - **Temporary storage**: `/tmp` is cleaned up after each worker session --- *This is a proposal from the agent evolver, revised per CTO feedback (2026-04-08). @freemo — the description has been updated to reflect your final direction (clone isolation restored). Ready for your review.* --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison
Author
Owner

They should only need permission to clone if they are going to run the software. For reading the source code only they can just read from the local working directory.

They should only need permission to clone if they are going to run the software. For reading the source code only they can just read from the local working directory.
Author
Owner

CTO feedback noted. The key clarification is:

  • Agents that only read source code (e.g., bug hunter analyzing code patterns) should read from the local working directory (/app) — no clone permission needed.
  • Agents that need to run the software (e.g., executing tests, running nox sessions) would need clone permissions.

This changes the scope of the proposed fix. The ca-bug-hunter in Worker Mode should be updated to read from the local working directory instead of cloning. The git clone* permission should only be added for agents that genuinely need to execute the code.

The implementor should revise the proposal accordingly: instead of adding clone permissions, update the Worker Mode instructions to use the local working directory for source analysis.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: ca-human-liaison

CTO feedback noted. The key clarification is: - **Agents that only read source code** (e.g., bug hunter analyzing code patterns) should read from the local working directory (`/app`) — no clone permission needed. - **Agents that need to run the software** (e.g., executing tests, running nox sessions) would need clone permissions. This changes the scope of the proposed fix. The `ca-bug-hunter` in Worker Mode should be updated to read from the local working directory instead of cloning. The `git clone*` permission should only be added for agents that genuinely need to execute the code. The implementor should revise the proposal accordingly: instead of adding clone permissions, update the Worker Mode instructions to use the local working directory for source analysis. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: ca-human-liaison
Author
Owner

Once the description has been updated per my comment please tag me so I can review and approve.

Once the description has been updated per my comment please tag me so I can review and approve.
Owner

@freemo — The proposal description has been updated per your feedback. The revised approach removes the Clone Isolation Protocol from Worker Mode and instead instructs workers to read source code directly from the local working directory (/app). No permission changes needed. Ready for your review.


Automated by CleverAgents Bot
Supervisor: Agent Evolver | Agent: agent-evolver

@freemo — The proposal description has been updated per your feedback. The revised approach removes the Clone Isolation Protocol from Worker Mode and instead instructs workers to read source code directly from the local working directory (`/app`). No permission changes needed. Ready for your review. --- **Automated by CleverAgents Bot** Supervisor: Agent Evolver | Agent: agent-evolver
Author
Owner

@HAL9000 do thes bug hunters work exclusively off master or will they also work on branches for working pull requests. If they work on different branches this read only from local directory won't work as the agents will fight to switch the branch. So with hat said I think we might need clone isolation after all.

Lets backtrack on my last comment and give the worker the ability to clone git into /tmp following the same rules as other agents (like it must clean up its repo after). This is because it may need to switch branches when reading from the repo and we cant safely do that locally.

@HAL9000 do thes bug hunters work exclusively off master or will they also work on branches for working pull requests. If they work on different branches this read only from local directory won't work as the agents will fight to switch the branch. So with hat said I think we might need clone isolation after all. Lets backtrack on my last comment and give the worker the ability to clone git into `/tmp` following the same rules as other agents (like it must clean up its repo after). This is because it may need to switch branches when reading from the repo and we cant safely do that locally.
Owner

@freemo Understood — reverting to clone isolation for bug hunters.

Your updated direction: bug hunters may need to switch branches (e.g., to read code from a working PR branch), so reading from the local /app directory is not safe — multiple workers could conflict when switching branches. The correct approach is to give workers the ability to clone into /tmp with the same cleanup rules as other agents.

I will update the proposal description to reflect this revised approach:

Changes to description:

- **Revised approach**: Instead of adding `git clone*` permissions, update the Worker Mode instructions
-   to read from the local working directory (`/app`) for source code analysis.
+ **Revised approach**: Give bug hunter workers the ability to clone the repository into `/tmp`
+   (following the same rules as other agents — must clean up after). This allows workers to safely
+   switch branches when analyzing code from working pull requests without conflicting with other workers.

I am updating the issue description now and will tag you when it is ready for re-review.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison

@freemo Understood — reverting to clone isolation for bug hunters. Your updated direction: bug hunters may need to switch branches (e.g., to read code from a working PR branch), so reading from the local `/app` directory is not safe — multiple workers could conflict when switching branches. The correct approach is to give workers the ability to clone into `/tmp` with the same cleanup rules as other agents. I will update the proposal description to reflect this revised approach: **Changes to description:** ```diff - **Revised approach**: Instead of adding `git clone*` permissions, update the Worker Mode instructions - to read from the local working directory (`/app`) for source code analysis. + **Revised approach**: Give bug hunter workers the ability to clone the repository into `/tmp` + (following the same rules as other agents — must clean up after). This allows workers to safely + switch branches when analyzing code from working pull requests without conflicting with other workers. ``` I am updating the issue description now and will tag you when it is ready for re-review. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison
Owner

@freemo The issue description has been updated to reflect your final direction from 2026-04-08.

Your feedback: Bug hunters may need to switch branches when analyzing code from working PR branches. Multiple workers reading from the same local /app directory would conflict. The correct approach is to clone into /tmp with cleanup — same rules as other agents.

Conclusion: Clone isolation is restored. The description now specifies:

  • Workers clone into /tmp/bug-hunter-<module>
  • Workers may git checkout <branch> to analyze PR branches
  • Mandatory cleanup: rm -rf /tmp/bug-hunter-<module> after analysis
  • Add git clone* permission to the worker's allowed commands

Changes made to description:

- **Revised approach**: Instead of adding `git clone*` permissions, update the Worker Mode instructions
-   to read from the local working directory (`/app`) for source code analysis.
+ **Revised approach**: Give bug hunter workers the ability to clone the repository into `/tmp`
+   (following the same rules as other agents — must clean up after). This allows workers to safely
+   switch branches when analyzing code from working pull requests without conflicting with other workers.

Ready for your review and approval. To approve: remove the Needs Feedback label or comment with approval.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison

@freemo The issue description has been updated to reflect your final direction from 2026-04-08. **Your feedback**: Bug hunters may need to switch branches when analyzing code from working PR branches. Multiple workers reading from the same local `/app` directory would conflict. The correct approach is to clone into `/tmp` with cleanup — same rules as other agents. **Conclusion**: Clone isolation is restored. The description now specifies: - Workers clone into `/tmp/bug-hunter-<module>` - Workers may `git checkout <branch>` to analyze PR branches - Mandatory cleanup: `rm -rf /tmp/bug-hunter-<module>` after analysis - Add `git clone*` permission to the worker's allowed commands **Changes made to description**: ```diff - **Revised approach**: Instead of adding `git clone*` permissions, update the Worker Mode instructions - to read from the local working directory (`/app`) for source code analysis. + **Revised approach**: Give bug hunter workers the ability to clone the repository into `/tmp` + (following the same rules as other agents — must clean up after). This allows workers to safely + switch branches when analyzing code from working pull requests without conflicting with other workers. ``` Ready for your review and approval. To approve: remove the `Needs Feedback` label or comment with approval. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#3093
No description provided.