Restores the working OpenCode server mode + curl-based async supervisor
launch functionality from commit 9bbec0e6 (2026-04-02) and updates it for
the current 13-supervisor architecture.
Changes applied to 7 agent files (938 insertions, 221 deletions):
1. product-builder.md: Restored from 9bbec0e6 and updated for 13 supervisors
- Full bash permissions for curl/sleep
- Server URL: http://localhost:4096
- Launch via POST /session + POST /session/:id/prompt_async
- Session resume (adopts existing [CA-AUTO] sessions)
- Added ca-test-infra-improver and ca-project-owner to launch sequence
- Updated concurrent worker calculations (~5N + ~8 singletons)
2. issue-implementor.md: Restored curl-based worker dispatch
- 10-second polling loop with bash sleep
- Worker sessions via prompt_async
- Session resume for existing workers
3. ca-continuous-pr-reviewer.md: Restored curl dispatch pattern
4. ca-uat-tester.md: Restored curl pool mode
5. ca-bug-hunter.md: Restored curl pool mode
6. ca-test-infra-improver.md: Added self-dispatch permission
7. ca-session-cleanup.md: Restored utility agent
Architecture: 5 pool supervisors (N workers each) + 8 singleton supervisors
= 13 total supervisors running async via prompt_async.
Replaces the broken prompt_async implementation from commit 074c472e that
removed supervisors from task permissions without working server launch.
To use: Start OpenCode with --port 4096, then launch product-builder.
Refs: commit 9bbec0e6 (working version), commit 074c472e (broken version)
Agents were failing when trying to run complex bash commands (curl with
pipes to python3, multi-command pipelines, etc.) because their bash
permissions were set to '"*": deny' with only specific simple patterns
allowed (e.g., "curl *": allow). Shell pipelines like:
curl -s http://localhost:4096/session | python3 -c "import json..."
don't match any single allow pattern and get denied.
Changed 17 agent files from restrictive bash permissions to '"*": allow'.
This includes all agents that need to:
- Run curl pipelines with python3 for prompt_async session management
- Create Forgejo dependency links via REST API curl calls
- Execute complex git operations with pipes
- Run bash sleep for polling loops
Only 3 truly read-only analysis agents remain restricted:
ca-difficulty-evaluator, ca-implementation-reviewer, ca-issue-analyzer.
These don't need bash access at all.
Four changes in one commit across 27 agent files:
1. POOL SUPERVISOR PROMPT_ASYNC: All 4 pool supervisors (issue-implementor,
ca-continuous-pr-reviewer, ca-uat-tester, ca-bug-hunter) now dispatch
their internal workers via the OpenCode Server's prompt_async endpoint
instead of the Task tool. This eliminates the wait_for_all bottleneck
at the supervisor level — workers run independently, and a 10-second
polling loop detects completions and immediately refills vacant slots.
Added curl/sleep bash permissions where needed. Each supervisor keeps
N workers running at all times with zero idle slots.
2. SESSION RESUME INSTEAD OF CLEANUP: The product-builder and all 4 pool
supervisors now RESUME existing sessions from a previous interrupted
run instead of aborting them. Phase C.0 queries the server for sessions
titled "[CA-AUTO] supervisor:*" and adopts any that are still active
into the monitoring loop. Pool supervisors similarly adopt existing
"[CA-AUTO] worker-*" sessions. This enables "continue where you left
off" — restarting the product-builder reconnects to running supervisors
and workers rather than duplicating them.
3. DEDICATED CLEANUP AGENT: New ca-session-cleanup.md primary agent for
explicit fresh-start cleanup. Run this BEFORE the product-builder when
you want to abort all previous sessions and start completely fresh. It
finds all "[CA-AUTO]" sessions, aborts them, and deletes them. This is
the ONLY way to kill old sessions — the product-builder never does it
automatically.
4. BOT SIGNATURES: All 26 agents that post content to Forgejo now include
a mandatory "Bot Signature" section requiring every comment, issue body,
PR description, and review to end with:
---
**Automated by CleverAgents Bot**
Supervisor: <category> | Agent: <agent-name>
24 agents have hardcoded categories. 2 shared agents (ca-new-issue-creator,
ca-epic-planner) use a parameter-based category from their caller's prompt.