openclaw - 💡(How to fix) Fix [Bug]: WhatsApp channel login can stall before a usable terminal QR is exposed [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#76213Fetched 2026-05-03 04:40:38
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
2
Author
Timeline (top)
commented ×2labeled ×1mentioned ×1subscribed ×1

WhatsApp channel re-authentication can enter the connection flow without reliably exposing a usable terminal QR through the active CLI runtime.

Root Cause

Affected: WhatsApp channel login/re-authentication through the OpenClaw CLI. Severity: High for affected WhatsApp onboarding or re-authentication attempts because the QR is required to complete login. Frequency: Observed during the reported re-authentication attempt Consequence: WhatsApp login can require manual retry/debugging before the QR can be scanned.

Fix Action

Fix / Workaround

Fix approach:

  • Route explicit bundled WhatsApp login through the narrow WhatsApp login runtime instead of the broader channel runtime.
  • Pass the active RuntimeEnv into WhatsApp socket creation for terminal QR rendering.
  • Write the QR heading and ASCII QR through RuntimeEnv.writeStdout when available, with fallback to runtime logging/stdout.
  • Mark channels login/logout as minimal startup commands that bypass config guard and avoid plugin loading.
  • Load only the configured-channel registry when channel auth needs to infer a channel from config.
  • Add regression coverage for runtime-routed terminal QR output and channel auth startup policy.
  • Refresh the local Baileys compatibility patch for the current WhatsApp Web version and unified_session behavior observed during pairing/login. @dougvk Comment

Code Example

Observed terminal state: the WhatsApp login flow printed "Waiting for WhatsApp connection..." but did not reliably expose a usable terminal QR through the active CLI runtime.

Code-path evidence: QR rendering was tied to direct stdout/console output instead of the active RuntimeEnv writer, and explicit WhatsApp channel login was routed through broader channel/plugin startup machinery instead of a narrow bundled login path.

Verification evidence after fix: targeted CLI/channel/WhatsApp tests passed, and manual smoke verification confirmed WhatsApp send worked after re-authentication.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

WhatsApp channel re-authentication can enter the connection flow without reliably exposing a usable terminal QR through the active CLI runtime.

Steps to reproduce

  1. Start OpenClaw 2026.4.29 from a source checkout.
  2. Run openclaw channels login --channel whatsapp.
  3. Observe the command entering the WhatsApp connection flow and printing "Waiting for WhatsApp connection..." without reliably exposing a usable terminal QR through the active CLI runtime.

Expected behavior

The WhatsApp login command should print the Linked Devices QR code through the active CLI runtime so it can be scanned from the invoking terminal.

Actual behavior

The command entered the WhatsApp connection flow and could appear stuck at "Waiting for WhatsApp connection..." without a usable terminal QR being exposed through the active CLI runtime.

OpenClaw version

2026.4.29

Operating system

Arch Linux

Install method

Source checkout / pnpm build / local CLI

Model

N/A

Provider / routing chain

N/A

Additional provider/model setup details

N/A

Logs, screenshots, and evidence

Observed terminal state: the WhatsApp login flow printed "Waiting for WhatsApp connection..." but did not reliably expose a usable terminal QR through the active CLI runtime.

Code-path evidence: QR rendering was tied to direct stdout/console output instead of the active RuntimeEnv writer, and explicit WhatsApp channel login was routed through broader channel/plugin startup machinery instead of a narrow bundled login path.

Verification evidence after fix: targeted CLI/channel/WhatsApp tests passed, and manual smoke verification confirmed WhatsApp send worked after re-authentication.

Impact and severity

Affected: WhatsApp channel login/re-authentication through the OpenClaw CLI. Severity: High for affected WhatsApp onboarding or re-authentication attempts because the QR is required to complete login. Frequency: Observed during the reported re-authentication attempt Consequence: WhatsApp login can require manual retry/debugging before the QR can be scanned.

Additional information

The fix routes explicit bundled WhatsApp login through a narrower login path, writes terminal QR output through the active runtime writer when available, and reduces unnecessary plugin/config startup work for channel login/logout.

Fix approach:

  • Route explicit bundled WhatsApp login through the narrow WhatsApp login runtime instead of the broader channel runtime.
  • Pass the active RuntimeEnv into WhatsApp socket creation for terminal QR rendering.
  • Write the QR heading and ASCII QR through RuntimeEnv.writeStdout when available, with fallback to runtime logging/stdout.
  • Mark channels login/logout as minimal startup commands that bypass config guard and avoid plugin loading.
  • Load only the configured-channel registry when channel auth needs to infer a channel from config.
  • Add regression coverage for runtime-routed terminal QR output and channel auth startup policy.
  • Refresh the local Baileys compatibility patch for the current WhatsApp Web version and unified_session behavior observed during pairing/login. @dougvk Comment

extent analysis

TL;DR

Route explicit WhatsApp login through a narrower login path and write terminal QR output through the active runtime writer to fix the WhatsApp channel re-authentication issue.

Guidance

  • Verify that the WhatsApp login command is using the correct runtime environment and that the active RuntimeEnv writer is available for terminal QR rendering.
  • Check the code path for QR rendering to ensure it is tied to the active RuntimeEnv writer instead of direct stdout/console output.
  • Review the channel/plugin startup machinery to ensure that explicit WhatsApp channel login is routed through a narrow bundled login path instead of the broader channel/plugin startup machinery.
  • Test the fix by running targeted CLI/channel/WhatsApp tests and performing manual smoke verification to confirm WhatsApp send works after re-authentication.

Example

No code snippet is provided as the issue does not contain sufficient code details.

Notes

The fix approach provided in the issue suggests that the problem is related to the routing of WhatsApp login and the rendering of the terminal QR code. The solution involves routing explicit WhatsApp login through a narrower login path and writing terminal QR output through the active runtime writer.

Recommendation

Apply the workaround by routing explicit WhatsApp login through a narrower login path and writing terminal QR output through the active runtime writer, as this approach has been verified to fix the issue and has been tested through targeted CLI/channel/WhatsApp tests and manual smoke verification.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The WhatsApp login command should print the Linked Devices QR code through the active CLI runtime so it can be scanned from the invoking terminal.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING