Skip to content

Improve ChatGPT Deep Research progress reporting#2061

Merged
jackwener merged 2 commits into
jackwener:mainfrom
lavapapa:chatgpt-deep-research-result
Jul 11, 2026
Merged

Improve ChatGPT Deep Research progress reporting#2061
jackwener merged 2 commits into
jackwener:mainfrom
lavapapa:chatgpt-deep-research-result

Conversation

@lavapapa

@lavapapa lavapapa commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • report non-completed ChatGPT Deep Research widget states instead of returning only opaque unavailable
  • require a real widget_state.report_message body before returning status=completed
  • expose progress metadata such as async task id, widget session id, async status, Venus status, plan title/id, and wait-for-user deadline
  • keep polling running / not_ready states with --wait true, but return immediately for waiting_for_user / needs_user_action

Why

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_status endpoint can say COMPLETE while 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 as venus_widget_state.status = waiting_for_user_response_on_plan, but no report_message. The old command surfaced this as unavailable, which hid useful state and made --wait misleading.

Behavior

Completed historical reports are unchanged: if report_message exists and looks like a report, the command returns status=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:

  • running
  • not_ready
  • waiting_for_user
  • needs_user_action

with fields such as:

  • progress
  • asyncTaskConversationId
  • widgetSessionId
  • asyncStatus
  • venusMessageType
  • venusStatus
  • waitingForUserUntil
  • planTitle
  • planId

Test plan

/Users/marvin/.nvm/versions/node/v24.4.1/bin/node --check clis/chatgpt/utils.js
/Users/marvin/.nvm/versions/node/v24.4.1/bin/node --check clis/chatgpt/deep-research-result.js
/Users/marvin/.nvm/versions/node/v24.4.1/bin/node ./node_modules/.bin/vitest run --project adapter clis/chatgpt/utils.test.js clis/chatgpt/commands.test.js
git diff --check

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: COMPLETE remains diagnostic only; report completion requires report_message.

@jackwener jackwener force-pushed the chatgpt-deep-research-result branch from dc8dcd1 to 7ca12b7 Compare July 11, 2026 17:25
@jackwener jackwener merged commit c1ad696 into jackwener:main Jul 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants