Show OpenCode delegated-agent progress in the Agents panel #14395
Closed
SpyrosPsarras
started this conversation in
Ideas
Replies: 1 comment
|
Closing as a duplicate of #5952. Same gap: OpenCode native Task/child sessions are tracked in Track the remaining work and any focused adapter contribution in #5952. Related (Settled/liveness while OpenCode background work continues, not the Agents roster): #11730. Prior fix attempts closed without landing (#7393, #9295, #10858). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When using models through OpenCode, delegated work can run for a long time while the parent thread shows only its Working timer and the Agents panel says "No agents yet".
In one observed case, a delegated task ran for about 80 minutes and its child session made 81 model calls, but the parent event stream had no activity during that interval. In another, a Codex-model parent was waiting on an Anthropic-model reviewer that had entered a long rate-limit cooldown. The missing child activity made these different states difficult to distinguish.
This concerns the OpenCode integration, not the standalone Codex or Claude Code adapters. Our setup uses OpenCode through CLIProxyAPI, but the proposed integration would use OpenCode events without depending on that proxy.
Source finding
Inspected upstream commit: c18e5ea.
In apps/server/src/provider/Layers/OpenCodeAdapter.ts, related child sessions are tracked, but non-parent events are filtered unless they are child permission/question requests. Child activity therefore does not reach the existing task-progress presentation through that handler.
Simply removing the filter would be unsafe: child messages, titles, usage and completion events must not be treated as parent events.
Proposed focused contribution
Translate proven-related OpenCode child sessions into the existing task lifecycle/progress events, reusing the web/desktop Agents panel and mobile agent cards:
Keep existing child questions, permissions and cancellation behavior intact. Coalesce activity updates rather than forwarding every text delta. Recover current state on reconnect without replaying completed work or reviving stale activations.
Verification scope
Focused adapter and client-fold tests would cover a silent parent with an active child, nested/resumed sessions, unrelated-session filtering, retry-to-busy transitions, completion/error ordering, reconnect races, cancellation and bounded event volume. Runtime compatibility fixtures and isolated UI evidence would be needed before submitting a patch.
This is a source-inspected proposal; no implementation or passing-test claim is being made.
Maintainer question
Would you welcome a focused OpenCode adapter contribution for this existing Agents feature? A broader change to replace the parent Working label with an explicit retry-wait state would remain a separate proposal.
Investigation and design prepared with AI assistance; implementation design by Sol through OpenCode.
All reactions