Skip to content

[Bug]: WhatsApp doctor repair can match and terminate non-TUI processes #83283

@giodl73-repo

Description

@giodl73-repo

Summary

A local code audit found that WhatsApp responsiveness repair identifies local TUI processes with broad command-line matching. A non-TUI process whose argv happens to contain matching terms can be selected for termination during repair.

Affected area

  • src/commands/doctor-whatsapp-responsiveness.ts
  • parsePsPidLine
  • terminateLocalTuiProcesses

Expected

Doctor repair should only signal processes that are confidently identified as OpenClaw TUI clients.

Suggested fix

Make process detection argv-aware and anchored to the expected executable/subcommand shape. Before signaling, revalidate that the PID still refers to the same expected command, ideally with stable process metadata where available.

Suggested regression test

Mock ps output containing a non-TUI command with matching words in argv and assert it is not returned or signaled by the repair path.

Source: local code audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions