openclaw - 💡(How to fix) Fix [Feature]: Fine-grained hook permission for agent state (separate from conversation access) [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#74580Fetched 2026-04-30 06:22:43
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
2
Timeline (top)
commented ×2labeled ×1

Add a state-only hook permission level so plugins that only track agent lifecycle state (e.g. processing/communicating/sleeping) don't need full conversation access.

Root Cause

Add a state-only hook permission level so plugins that only track agent lifecycle state (e.g. processing/communicating/sleeping) don't need full conversation access.

Fix Action

Fix / Workaround

  • Current workaround (allowConversationAccess: true) — works but over-grants permissions and requires config file editing for basic state tracking
  • Removing the hook entirely and using timeouts — loses real-time state transitions, makes display behavior unreliable
RAW_BUFFERClick to expand / collapse

Summary

Add a state-only hook permission level so plugins that only track agent lifecycle state (e.g. processing/communicating/sleeping) don't need full conversation access.

Problem to solve

Since 2026.4.26, non-bundled plugins using agent_end, before_agent_reply, or before_tool_call must set hooks.allowConversationAccess: true. This makes sense for hooks that read raw conversation content — but not all plugins using these hooks read any conversation data at all. My plugin, OpenClaw Interaction Bridge, uses agent_end solely to send a state string (processing, communicating, sleeping) to an external display. The only data accessed is sessionKey. No conversation content is read.

Users must grant full conversation access just to get agent state updates on a physical display. The current all-or-nothing gate makes a simple "show me when the AI is thinking" use case require the same permission as "read everything the AI says." This is intimidating for users: "I just want the sleeping face to work — why do I need to grant conversation access?"

Proposed solution

Proposed solution: Add hooks.allowStateAccess: true as a granular alternative to allowConversationAccess. This would cover hooks that only need agent lifecycle state, not conversation content:

  • agent_end — "the agent finished its turn"
  • before_agent_reply — "the agent started generating"
  • before_tool_call — "the agent is using a tool"

These hooks signal that something happened, not what was said. They don't expose conversation text, model output, or user input. Alternative: split agent_end to emit a minimal state-only payload (no conversation content) that doesn't require any permission flag, while hooks that expose content (llm_input, llm_output, before_agent_finalize) remain gated behind allowConversationAccess.

Alternatives considered

  • Current workaround (allowConversationAccess: true) — works but over-grants permissions and requires config file editing for basic state tracking
  • Removing the hook entirely and using timeouts — loses real-time state transitions, makes display behavior unreliable

Impact

  • Affected: All plugin authors using agent lifecycle hooks for state tracking, display drivers, LED indicators, status APIs
  • Severity: Blocks workflow — plugins that should work out of the box require manual config editing and a scary permission grant
  • Frequency: Always — every install of a state-tracking plugin hits this
  • Consequence: Poor out-of-box experience, user confusion about why conversation access is needed for a display, reduced plugin adoption

Evidence/examples

OpenClaw Interaction Bridge — physical display plugin that only needs agent_end for state tracking but must request allowConversationAccess The plugin's README now documents this as an "optional config" step: https://github.com/snarflakes/openclaw-interaction-bridge/blob/development/README.md

Additional information

This is particularly relevant for hardware integration use cases (Raspberry Pi displays, LED strips, status APIs) where the plugin never touches conversation content but needs to know when the agent is active vs idle. Making state tracking permission-free would improve the plugin ecosystem for physical computing and IoT integrations.

extent analysis

TL;DR

Add a new permission level, hooks.allowStateAccess, to grant access to agent lifecycle state without requiring full conversation access.

Guidance

  • Introduce a new permission flag, allowStateAccess, as a granular alternative to allowConversationAccess for hooks that only need agent lifecycle state.
  • Update the affected hooks (agent_end, before_agent_reply, before_tool_call) to use the new allowStateAccess permission.
  • Consider splitting agent_end to emit a minimal state-only payload that doesn't require any permission flag.
  • Evaluate the impact of this change on existing plugins and hardware integration use cases.

Example

No code snippet is provided as it is not explicitly supported by the issue.

Notes

The proposed solution aims to address the issue of over-granting permissions for plugins that only need agent lifecycle state. However, the implementation details and potential edge cases need to be carefully considered.

Recommendation

Apply the workaround by introducing the new allowStateAccess permission level, as it provides a more granular and secure way to manage plugin permissions. This change can improve the plugin ecosystem for physical computing and IoT integrations.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: Fine-grained hook permission for agent state (separate from conversation access) [2 comments, 3 participants]