Repository navigation
Conversation
There was a problem hiding this comment.
This fixes the issue. I ran the issue's reproduction from source: with the 4-second plugin, base starts the --prompt session on Build and this PR starts it on Reviewer. Without the slow plugin it still starts on Reviewer. app-lifecycle.test.tsx passes (40/40), and the new test fails on base as it should. tsc -b for packages/tui passes.
Public API: unchanged. The change is TUI-only and uses the existing plugin.list endpoint and plugin.updated event.
One concern, inline: when the plugin list is empty or the request fails, --prompt now waits until a plugin.updated event arrives. If that event never comes (activation never finishes, as in #63130, or the request fails), the prompt is never sent and the user gets no message. Before this change it was sent, just on the wrong agent.
| async (target) => { | ||
| try { | ||
| const plugins = await client.api.plugin.list({ location: target }) | ||
| if (!plugins.data.length) return false |
There was a problem hiding this comment.
Both return false paths (an empty list here, and the catch below) wait until a plugin.updated event refetches. Activation can hang (#63130 keeps the plugin list empty forever), and a request can fail. In both cases the --prompt text sits in the composer and is never sent, with nothing telling the user. Before this change it was at least sent. Could the error path fall back to submitting (return true)? A bounded wait for the empty-list case would also help, so a stuck plugin degrades to the old behaviour instead of a silent hang.
There was a problem hiding this comment.
Addressed the silent-wait concern with visible waiting/error feedback. The prompt remains editable, and the Enter-to-send hint appears only once the current agent/model can actually submit. Manual submission remains an explicit user choice; the automatic path still waits for activation and a fresh agent snapshot. Returning true on failure or timeout would silently reintroduce #63192's Build fallback.
The lifecycle regression now covers an inventory request failure, an empty inventory, recovery with a held agent refresh, exactly-once automatic submission, and explicit manual submission while the inventory request is failing. No server-side waiting was added.
There was a problem hiding this comment.
Thanks, I've looked at 0c737fbb1. Showing "Press Enter to send manually" only once an agent and model are ready makes sense. The waiting and error hints still appear either way, and the automatic send still waits for a fresh agent list. I agree that a visible wait with a manual option is better than quietly falling back to Build. This thread is resolved from my side.
There was a problem hiding this comment.
The new commit addresses my earlier point. When the plugin list is empty or the request fails, the home screen now says the prompt is waiting for plugins (or that they could not be loaded) and that Enter sends it manually, so the user is no longer left with a silent hang. I re-ran the issue's reproduction: the hint shows while the slow plugin loads, and the session then starts on Reviewer (base starts on Build). app-lifecycle.test.tsx passes (40/40) and tsc -b for packages/tui is clean.
Public API: unchanged.
No new concerns.
There was a problem hiding this comment.
The new commit is fine. The waiting and error hints still show, and "Press Enter to send manually" now only appears once a send can actually go through. I re-ran the issue's reproduction on this head and the session still starts on Reviewer (base: Build). app-lifecycle.test.tsx passes (41/41) and tsc -b for packages/tui is clean.
Public API: unchanged.
No new concerns.
|
Reporter of #63192 here. We're still hitting this on v2.3.2. That release's The bot's re-runs confirm this PR fixes the repro, and checks are green. Could a maintainer take a look when there's a chance? Happy to test a build if that helps. Thanks @gongfpp for picking it up. |





Issue for this PR
Closes #63192
Type of change
What does this PR do?
Wait for the Location's plugin inventory before submitting a home-screen
--prompt, then refresh agents so the configured default wins over the temporary Build fallback. Refresh onplugin.updated; show waiting/error feedback instead of silently hanging. Offer manual submission only when an agent/model is ready, without silently falling back to Build. Server handlers remain non-blocking. No experimental flag applies.How did you verify your code works?
bun run checkand the TUI's officialbun run typecheck:tscpassed; the push hook also passed without bypassing it.zh-CN-dependent model-menu ordering failures (the test assumes English collation). The fixed run also hit a group-view 20-frame wait limit. The four earlier session-tab 2-second timeouts passed in both sequential full runs. Isolated tab/group-view suites pass 28/28 on both original and fixed code; temporarily requesting English collation makes both menu tests pass. All diagnostic edits were restored; these unrelated tests are unchanged.AI-assisted implementation and verification; the human owner followed development. Changes are limited to the client startup flow and its lifecycle regressions.
Visual
Screenshots / recordings
Actual isolated TUI captures with the same 4-second plugin:
Pending activation now has visible feedback (the manual-send hint appears only once submission is possible):
Checklist
Added by the opencode bot (AI-generated).
Related: #63130, #56265