Skip to content

openclaw logs --follow registers as paired device, rewrites paired.json #83656

@bottenbenny

Description

@bottenbenny

Bug Description

openclaw logs --follow connects through the gateway websocket layer and registers as a full paired device, causing paired.json rewrites and contributing to file read race conditions.

Steps to Reproduce

  1. Check paired.json state: stat ~/.openclaw/devices/paired.json
  2. Note the inode and modify timestamp
  3. Run openclaw logs --follow
  4. Check paired.json again: stat ~/.openclaw/devices/paired.json
  5. Observe inode changed (temp-file + rename write pattern)

Expected Behavior

openclaw logs --follow should behave like a passive log reader (tail -F), not as a full gateway client. It should:

  • NOT register in paired.json
  • NOT trigger device state updates
  • Use a lightweight "observer" mode with read-only access to logs

Actual Behavior

  • openclaw logs --follow registers as a device with clientMode: cli and operator.write scope
  • Every connection triggers a paired.json rewrite (inode change observed)
  • Contributes to file read races when other components read during rewrite
  • Has operator.write scope despite being a log reader

Environment

  • OpenClaw version: 2026.5.12
  • OS: Ubuntu 24.04.4 LTS
  • paired.json entries: 4 (2 stale, 36-47 days old)

Related Issues

Recommendation

Add a CLI "observer" mode that:

  1. Connects to gateway websocket for log streaming
  2. Does NOT write to paired.json
  3. Does NOT participate in device/session activity
  4. Has minimal scope (read-only log access)

Or alternatively: make openclaw logs --follow use direct file tailing instead of websocket connection.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

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