Skip to content

fix(clients): zen shows the agent's reply while a question waits on you - #35301

Open
Silthus wants to merge 7 commits into
pingdotgg:mainfrom
Silthus:fix/zen-question-shows-reply
Open

Silthus wants to merge 7 commits into
pingdotgg:mainfrom
Silthus:fix/zen-question-shows-reply

Conversation

@Silthus

@Silthus Silthus commented Nov 12, 2026 •

Copy link
Copy Markdown

Problem

With Tool calls in chat set to Zen, an agent that writes a reply and then asks a question shows the user only the question card. Zen hides every assistant message of a run that is still working, and a pending question keeps the run working. The reply stays hidden until the turn ends, so the user has to press Stop to read what the agent wrote before answering. Mobile shows the reply as a one-line "thinking" preview instead.

Steps: turn on Zen, run an agent turn that writes a reply and then calls its question tool (AskUserQuestion in Claude). Only the question card shows.

Note

🔵 Merge risk: low · two-way door: a client-side view rule, nothing persisted

  • Zen users on web and desktop whose agent asks a question: the base hides the last reply before the question until the turn ends. HEAD shows it above the question card, while the question is open and after the answer, and the live preview shows only newer text. Covered by the unit tests and a live run on a thread the base wrote and one HEAD wrote.
  • Unchanged: every other tool-call setting, and approvals in Zen. The new rule sits inside the zen branch; the existing hide-successful and hide-all assertions pass unchanged.
  • Uncovered in a running app, unit tests only: mobile, and the secret and link request cards on web. A missed bug there leaves the reply hidden or shown twice, the base's cosmetic behavior, for Zen users who meet those cards.
  • Switch-off: none: live on deploy, fix forward. A user can leave Zen in Settings.

Change

Zen keys on the feed, not on a pending-request flag: the last assistant reply before a question (user_input_request, pending or answered), a secret_request, or a link_request stays visible. Agents often run a command or a tool between the reply and the question, so only a user message ends the search. The live one-line preview stops at the request, so it never repeats the reply above it. Web (MessagesTimeline.logic.ts) and mobile (threadActivity.ts) get the same rule. Nothing changes outside zen.

Scope

Small fix of a bug in the new Zen setting (#30000, #33131), no issue. Zen's own description says "questions … always show", and the question cannot be answered without the reply it refers to.

Verification

  • Web unit test (MessagesTimeline.logic.test.ts, zen case): the reply shows above a pending question, above an answered question while the run still works, above a secret request, and when a command runs between the reply and the question. Only the last reply shows, and the preview shows newer thinking only. On the base: expected [ 'user', …(2) ] to include 'final'.
  • Mobile unit test (threadActivity.test.ts, zen case): [ 'user', 'final', 'question', 'thinking:' ] after the answer; on the base [ 'user', 'thinking:final' ]. Secret and link request cards keep the reply on both clients.
  • vp test for apps/web/src/components/chat (479 passed) and mobile threadActivity plus features/threads (335 passed); web and mobile typecheck pass. All required CI checks pass on this head.
  • Live run: a thread the base code wrote and a new thread, both loaded under this change; the reply shows with the question open, after the answer while the run works, and after the turn ends.
  • Real data: I replayed the rule over the question, secret, and link requests stored in a local T3 state database. Every request with an earlier reply in its run keeps that reply. The others asked before writing anything. This replay is why the rule allows tool calls between the reply and the question.
  • Manual: dev server, Zen on, the Replay (dev) question scenario with a reply chunk before the elicitation and a slow thinking stream after the answer (local fixture edit, not committed).
Before Question open After the answer, still working
Before: only Thinking above the open question The full reply above the open question The reply stays above the answered question while the run keeps thinking

I did not check the mobile app on a device. The mobile change is covered by the unit test only.

Decisions
Question Answer Who Where
What keeps the reply visible? The feed: the last reply before a question, secret, or link request, pending or answered. This replaces a pending-request flag, which hid the reply again after the answer. 🤖 review round 2
Do approvals reveal the narration before them? No, approvals keep the base Zen behavior: their card carries the command. 🤖 review round 2
May work sit between the reply and the request? Yes, any work. Only a user message ends the search, because real agents often run a command or tool before they ask. 🤖 real-data replay

Involvement: two review rounds (one reviewer, then a seven-lens panel across two model families) and a final read; UI walk and real-data replay captured.

Claude Opus 5.5 in Claude Code, run from T3 Code.

🤖 Generated with Claude Code

Zen hid every assistant message of a run that was still working, and a
pending question keeps the run working. The reply written right before
the question stayed hidden until the turn ended, so the user saw the
question card alone, or a one-line preview on mobile, and had to press
Stop to read what the agent wrote.

While a question or approval waits on the user, zen now treats the run
as answered: the latest reply shows in full, and the live one-line
preview is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus added a commit to Silthus/t3code that referenced this pull request Nov 12, 2026
Silthus added a commit to Silthus/t3code that referenced this pull request Nov 12, 2026
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 12, 2026
Silthus and others added 2 commits November 12, 2026 15:20
Zen showed the reply before a question only while the question was
pending. Answering keeps the run working, so the reply vanished again the
moment you submitted, and the answered question stood without its context.
Mobile also missed secret and link requests, which carry no runtime
request.

Zen now keys on the feed: the reply an agent wrote right before a
question, secret, or link request stays, pending or answered. Reasoning
and the one tool call that asks may sit between them; narration followed
by other work stays hidden. The live preview only shows text newer than
the request. Approvals keep the base behavior: their card carries the
command, and narration before each one would clutter zen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l calls

Real threads often run a command or a tool, such as a wait or an unwatch,
between the reply and the question. Limiting the gap to one tool call kept
those replies hidden, so zen now keeps the last reply written before the
request in that response, whatever work sits between them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus added a commit to Silthus/t3code that referenced this pull request Nov 12, 2026
Cover the secret and link request cards on web and mobile: the reply
before them stays, and the live preview does not repeat it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus marked this pull request as ready for review November 12, 2026 16:08
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Mobile and web Zen visibility now retain the latest assistant reply before a user-input, secret, or link request. Live answer previews stop at these requests. Tests cover reply visibility, request ordering, intervening activity, and preview selection.

Changes: Zen request visibility

Layer / File(s) Summary
Retain replies before requests
apps/mobile/src/lib/threadActivity.ts, apps/web/src/components/chat/MessagesTimeline.logic.ts, apps/mobile/src/lib/threadActivity.test.ts, apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Both implementations retain the latest assistant reply before a user-input, secret, or link request. A subsequent user message clears the candidate. Tests cover intervening activity, request ordering, and later replies.
Stop live previews at requests
apps/mobile/src/lib/threadActivity.ts, apps/web/src/components/chat/MessagesTimeline.logic.ts, apps/mobile/src/lib/threadActivity.test.ts, apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Live answer previews stop when they reach a user-input, secret, or link request. Tests verify that later reasoning can become the preview.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: flamboh, juliusmarminge

Merge Risk: Minimal · up to bec73

Zen now keeps the agent's last reply visible while a question, secret request, or link request is waiting on the user. The change is limited to client-side display logic and is covered by unit tests. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Zen mode now shows the agent's reply while a question waits on the user. It uses the conventional commit format and matches the changeset, which keeps the last assista…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and it includes the merge-risk note, the reproduction steps, the linked issue references, a list of test…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Zen mode now shows the agent's reply while a question waits on the user. It uses the conventional commit format and matches the changeset, which keeps the last assistant reply visible before question, secret, and link requests on web and mobile.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and it includes the merge-risk note, the reproduction steps, the linked issue references, a list of tests and their results, a live run, a replay over real data, and before/after screenshots. The Verification section also states what was not checked: the mobile app on a device and the secret and link cards in a running app. The Scope section cites issues #30000 and #33131 but does not link them as URLs. The PR does not state a model or harness in the required form, although the author does name Claude Opus 5.5 and Claude Code at the end.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b803f37 and bec7360.

Files selected for processing: 4

  • apps/mobile/src/lib/threadActivity.test.ts
  • apps/mobile/src/lib/threadActivity.ts
  • apps/web/src/components/chat/MessagesTimeline.logic.test.ts
  • apps/web/src/components/chat/MessagesTimeline.logic.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 14, 2026
juliusmarminge and others added 3 commits November 14, 2026 05:48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants