Context
A companion fix was shipped to lswingrover/MacWatch (issue #1, PR #2) that overhauled the macwatch-diagnose and macwatch-act skills to apply session-aware risk tiers before recommending /tmp/*.py file cleanup.
The core principle: idle Cowork sessions are not dead sessions. They can be dormant between polling cycles and own scripts in /tmp/ that they will attempt to execute at any time. A check for "is a Python process running this file right now" is not sufficient — you also need to ask list_sessions and evaluate file age and naming patterns before flagging anything for deletion.
NetWatch Status
The current netwatch-diagnose skill is purely diagnostic — it reads incident bundles and connector snapshots and produces a root-cause analysis. It does not currently recommend deleting local files or killing processes.
No code changes are needed today.
Why Track This
If NetWatch companion skills ever gain cleanup or remediation actions (a netwatch-act equivalent, or cleanup recommendations in netwatch-recommend), they should inherit the same session-aware risk model from day one rather than having to be patched after the fact.
If/When This Becomes Relevant
Apply the following principles to any NetWatch skill that recommends deleting or modifying local files:
- Call
list_sessions before any cleanup recommendation
- Tier files by age and name pattern:
- Auto-safe: older than 24h, no owning session
- Review-only: modified today, live-sounding names (fetch, sync, poll, update, monitor, bg_, processor, watcher)
- Never touch: modified in last 2h, currently executing
- Never say "safe to delete" about a file modified the same day
- Clarify disk impact — if the savings are negligible, say so
Reference
Context
A companion fix was shipped to lswingrover/MacWatch (issue #1, PR #2) that overhauled the
macwatch-diagnoseandmacwatch-actskills to apply session-aware risk tiers before recommending/tmp/*.pyfile cleanup.The core principle: idle Cowork sessions are not dead sessions. They can be dormant between polling cycles and own scripts in
/tmp/that they will attempt to execute at any time. A check for "is a Python process running this file right now" is not sufficient — you also need to asklist_sessionsand evaluate file age and naming patterns before flagging anything for deletion.NetWatch Status
The current
netwatch-diagnoseskill is purely diagnostic — it reads incident bundles and connector snapshots and produces a root-cause analysis. It does not currently recommend deleting local files or killing processes.No code changes are needed today.
Why Track This
If NetWatch companion skills ever gain cleanup or remediation actions (a
netwatch-actequivalent, or cleanup recommendations innetwatch-recommend), they should inherit the same session-aware risk model from day one rather than having to be patched after the fact.If/When This Becomes Relevant
Apply the following principles to any NetWatch skill that recommends deleting or modifying local files:
list_sessionsbefore any cleanup recommendationReference