background-agents icon indicating copy to clipboard operation
background-agents copied to clipboard

Allow to change the agent

Open Bnowako opened this issue 7 months ago • 2 comments

Currently only the build agent is supported, Opencode allows to change the agent per message sent.

The problem is that we can't fetch available agents before the start of the session (we need a running sandbox for that).

Considerations

  • Read Opencode config from the repo and infer available agents
    • pros: we have all the agents before sandbox starts
    • cons: we have to duplicate opencode config parsing, which adds complexity and a layer of indirection
  • Fetch the agents from opencode /agent endpoint
    • pros: opencode server is source of truth, so the agents are really running
    • cons: to show agents before session starts, we need to add a cache

Proposed implementation

  • Prompt-level agent selection through web -> control plane -> sandbox -> OpenCode
  • Agent discovery from live OpenCode /agent
  • Added repo+branch cache so agents can be shown before sandbox startup

Rushed implementation here.

Just wanted to bring up discussion if it's a good direction. cc: @ColeMurray

I deployed and if we agree I can refine the PR 🙇🏼‍♂️

Bnowako avatar Apr 20 '26 06:04 Bnowako

I feel even if this was limited to simply plan/build rather than trying to fully build out a whole agent system - could be a huge win, @ColeMurray I'd be happy to build this if this is something you'd be interested in?

rlweb avatar Sep 14 '26 15:09 rlweb

closing due to complexity with multi-harness

ColeMurray avatar Oct 31 '26 17:10 ColeMurray