Repository navigation
feat(task-stream): publish pending wizard_ask prompts as pending_input - #1008
Merged
Merged
Conversation
While the agent is blocked on a wizard_ask question, a user who tabbed over to the PostHog web app has no way to know the run is waiting on them. Publish the open question on the task-stream payload so the web app's sync widget can surface it. The wire is a full-state upsert, so the signal is a nullable field, not an event: pending_input is set while a question is open and absent on the next push once it is answered, cancelled, or timed out. Question open/close transitions bypass the 250ms debounce, same as phase changes, since the point of the signal is immediacy. Sensitive asks (secrets) publish only the fact that input is required, never the prompt text. Backend side: PostHog/posthog#74324 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This was referenced Jul 28, 2026
fercgomes
marked this pull request as ready for review
July 28, 2026 18:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While the agent is blocked on a
wizard_askquestion, a user who tabbed over to the PostHog web app has no way to know the run is waiting on them. The sync widget keeps showing a generic in-progress state until the 5-minute ask timeout cancels the question and the run degrades.Closes PostHog/posthog#74309. Backend and UI side: PostHog/posthog#74324.
Changes
TaskStreamUpdategains an optionalpending_inputfield:{ id, asked_at, question_count, sensitive, prompts? }, built fromsession.pendingQuestion. The wire is a full-state upsert, so the next push without the field is the dismissal signal. No new event type, no ordering concerns.PendingQuestiongains anaskedAtstamp (set by the ask bridge) so the web app can age the prompt; it stays stable across pushes for the lifetime of one ask.No new push wiring was needed:
TaskStreamPush.attach()already subscribes to all store changes, andrequestQuestion/resolvePendingQuestionalready bump the store version.Test plan
Extended
task-stream-push.test.ts(29 passing): payload contents for an open ask, omission when none is open, prompt withholding when any question is sensitive, and immediate flush on both the open and the clear transition. Full unit suite passes locally except one pre-existing locale-dependent yargs assertion unrelated to this change.LLM context
Authored with Claude Code. The alternative of adding an
awaiting_inputrun phase was rejected: the phase enum is load-bearing in the backend model, generated API clients, and every frontend phase branch, while a nullable side-field only touches consumers that care.🤖 Generated with Claude Code