Skip to content

Submitted prompts can stay queued or screen-only while the agent is already responding #339

Open

Description

@Juliusolsson05

Problem

Saved debug bundles show user prompts intermittently failing to render as normal feed user rows. In several captures the provider has accepted the prompt and the assistant has started working, but the prompt remains only in queuedMessages / QueueStrip, or is visible only in the terminal screen tail.

Related: #172, #185, #290, #90.

Evidence

Primary bundles:

  • ~/.config/agent-code/debug-bundles/manual/2026-06-22T11-53-14-054-3398cdb4

    • Note: "not rendering user prompts and messages stays in queue? what the fuck ?"
    • state-snapshot.json: queuedMessages[0] = "okay and we are ready to mkerge this now? what is status?"
    • awaitingAssistant=false, processActive=true, streamPhase="thinking"
    • html-clean.html: prompt appears only under queued-message UI / 1 queued
    • trace/screen/latest-tail.txt: prompt is visible in terminal, then agent is working
  • ~/.config/agent-code/debug-bundles/manual/2026-06-18T11-37-47-852-e5236cbe

    • Note: "user propmt not rendering? might transcript be disconnected?"
    • state-snapshot.json: queuedMessages[0] = "Sure merge all of them. ltes gamble"
    • awaitingAssistant=false, processActive=true, streamPhase="thinking"
    • feed HTML shows only QueueStrip
  • ~/.config/agent-code/debug-bundles/manual/2026-06-22T12-34-16-431-2db014bc

    • Note: "No user prompt again, why does this keep happening?"
    • queuedMessages=[], but the submitted prompt is visible in trace/screen/latest-tail.txt
    • feed HTML has assistant/work content but not the submitted user prompt as a feed row

May 20 saved notes show the same recurrence, including several active Codex snapshots with stuck queuedMessages.

Suspected Cause

addOptimisticCodexUserEntry() routes follow-up prompts into queuedMessages when semantic current/history is still renderable. That prevents ordering mistakes, but creates a fragile handoff: the prompt only becomes a normal feed row if a matching committed rollout/transcript user entry arrives and reconciles the queue.

When the session is already active (processActive=true, streamPhase=thinking/responding/submitting), the idle queue invariant cannot clear or promote it. If the authoritative user row is delayed, missing, filtered, or only visible on the screen tail, the prompt remains composer-adjacent or screen-only while the assistant continues.

Relevant paths:

  • src/renderer/src/workspace/hook/actions/streaming.ts
  • src/renderer/src/workspace/hook/ipc/useIpcSubscriptions.ts
  • src/renderer/src/workspace/queueInvariants.ts
  • src/renderer/src/workspace/tile-tree/TileLeaf/QueueStrip.tsx
  • src/renderer/src/features/feed/ui/Feed.tsx

Expected

After submit, every user prompt should have a durable visible owner in the conversation UI: optimistic feed row, promoted pending row, or reconciled committed row. The bad state happens while active, so relying on idle cleanup is not enough.

Activity

  1. Juliusolsson05 commented on Jun 22, 2026

    @Juliusolsson05
    OwnerAuthor

    Linking this back to #172. This is a concrete symptom of the current multi-owner feed architecture: queued/optimistic/committed user prompt state can lose a durable visible owner while semantic history/current/work are still rendered in separate planes.

    When #172 moves Feed to a single ordered FeedRenderItem[] ownership plan, this issue should be re-tested against that model. The expected end state is that a submitted prompt has exactly one visible owner: queue-strip, optimistic-submit, or committed, with an explicit handoff between them.

  2. Juliusolsson05 commented on Aug 31, 2026

    @Juliusolsson05
    OwnerAuthor

    Captured again on 2026-08-30 in a real Codex 0.151.0 run. The app-owned prompt row entered the queue with queueReason: live-current-turn (and an earlier prompt with unowned-history), remained visible in the queue strip, and never received the committed rollout user row needed for reconciliation. The same run emitted no usable transcript attachment because the running bundle compiled stale packages/codex-headless commit 4e10c167, omitting the exact proxy identity attachment merged via #703. PR #694 added observation only and explicitly did not change queue ownership/product behavior.

    The repair PR will combine the already-merged exact identity implementation with a build-time gitlink guard, retain the Stage 0 observations, and verify the queue-to-committed-row handoff end to end.

  3. added
    type:bugSomething works wrong
    class:C1-prompt-deliveryPrompt delivery inferred from the terminal screen
    sev:P1Core flow broken or badly degraded
    needs-evidenceNeeds a recording/real use to settle
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclass:C1-prompt-deliveryPrompt delivery inferred from the terminal screenneeds-evidenceNeeds a recording/real use to settleprovider:codexAffects Codex integrationsev:P1Core flow broken or badly degradedtype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions