Skip to content

Agent owners never see a tool access request, because the notifier rejects its subject #947

Description

@rubenvdlinde

What happens

An agent asks for a tool it lacks, or an owner grants one. The agent owner should get a Nextcloud notification. The notification is created, but the bell menu never shows it.

Why

ToolAccessRequestService::notifyOwner() raises the subjects tool_access_requested and tool_access_granted (ToolAccessRequestService.php:752-766). It is called from request() (:388) and from ToolOversightController after a grant (:341).

Neither subject is in Notifier::KNOWN_SUBJECTS (Notifier.php:60-68). prepare() throws UnknownNotificationException for any subject outside that list (Notifier.php:122-125). Nextcloud then drops the notification.

The docblock above the list records the same bug once before: budget_soft_threshold was raised but never recognised.

Since when

Since tool access requests landed on 17 and 18 August (334bcc9, a497d7d).

Fix direction

Add both subjects to KNOWN_SUBJECTS and give each a subject and message in resolveSubjectAndMessage(). A unit test that walks every setSubject() key raised under lib/ and asserts prepare() accepts it would stop the next one.

Live check

  1. Give an agent an owner and let it call hermiq.requestToolAccess for a tool it has not been granted.
  2. Log in as the owner and open the bell menu. Today nothing appears.
  3. Check oc_notifications for a row with app hermiq and subject tool_access_requested. The row exists, so the loss is in rendering.

Matrix row: tl-request-access (openspec/parity/capabilities.json).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageAwaiting triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions