spec

OpenClaw Browser and Exec Remediation Plan

2026-04-23

OpenClaw Browser and Exec Remediation Plan

This plan addresses two noisy failure classes without touching exec security settings yet:

  1. repeated browser prompts caused by avoidable use of the signed-in user browser profile
  2. Gateway-denied exec events caused primarily by inline interpreter heredocs, especially python3 <<'PY'

The approach is discipline first, guardrail changes later if needed.

What the data says

From the April 23 diagnosis work:

Ordered remediation list by leverage

1. Move daily-twitter-briefing off profile="user" today

Why first: highest likely browser-prompt reduction with the smallest workflow change.

Change:

Expected effect:

Definition of done:

2. Tighten session reuse in LinkedIn workflows

Why second: LinkedIn is the clearest legitimate live-session area, so the win comes from fewer attaches, not rerouting away from user.

Workflows:

Change:

Expected effect:

Definition of done:

3. Start the saved-helpers library for recurring heredoc patterns

Why third: this is the main non-browser root cause of Gateway denied noise.

Observed leak:

Build these helpers first, in this order:

3.1 scripts/json_array_subset.py

Purpose:

Why first:

Common uses:

3.2 scripts/mc_task_update.py

Purpose:

Why second:

Common uses:

3.3 scripts/json_record_backfill.py

Purpose:

Why third:

Common uses:

3.4 scripts/json_counts_report.py

Purpose:

Why fourth:

Common uses:

3.5 scripts/log_event_extract.py

Purpose:

Why fifth:

Common uses:

4. Pull a clean week of logged denial events

Why fourth: after routing and helper discipline are improved, get the clean measurement baseline Pete asked for.

Change:

Expected effect:

Definition of done:

What not to do yet

Smallest changes short of config edits

  1. Reroute daily-twitter-briefing away from user
  2. Reuse LinkedIn browser sessions more aggressively
  3. Replace recurring inline Python with small saved helpers
  4. Pull a clean denial week after the first three changes land

Success criteria

This remediation pass is successful if: