Improve ChatGPT Deep Research progress reporting#2061
Merged
Conversation
dc8dcd1 to
7ca12b7
Compare
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.
Summary
unavailablewidget_state.report_messagebody before returningstatus=completedrunning/not_readystates with--wait true, but return immediately forwaiting_for_user/needs_user_actionWhy
ChatGPT Deep Research runs inside a cross-origin internal widget, so the iframe DOM is not readable by OpenCLI. The reliable completed-report path is the conversation payload:
metadata.chatgpt_sdk.widget_state.report_message.content.parts[0].However, the outer ChatGPT
/stream_statusendpoint can sayCOMPLETEwhile the Deep Research widget itself has not produced a report yet. In live validation this appeared as a conversation with an internal Deep Research iframe and widget metadata such asvenus_widget_state.status = waiting_for_user_response_on_plan, but noreport_message. The old command surfaced this asunavailable, which hid useful state and made--waitmisleading.Behavior
Completed historical reports are unchanged: if
report_messageexists and looks like a report, the command returnsstatus=completed, report text, and sources.If a Deep Research widget is present but no report is ready yet, the command can now return structured non-completed statuses:
runningnot_readywaiting_for_userneeds_user_actionwith fields such as:
progressasyncTaskConversationIdwidgetSessionIdasyncStatusvenusMessageTypevenusStatuswaitingForUserUntilplanTitleplanIdTest plan
Result: targeted adapter tests passed: 2 files, 113 tests.
Notes
This keeps the previous completed-report extraction behavior and adds progress-aware semantics for report-not-ready widget states. The outer
/stream_status: COMPLETEremains diagnostic only; report completion requiresreport_message.