Skip to content

feishu: skill_workshop apply returns 'Plugin approval unavailable' even though approvalCapability is registered (2026.6.1) #92080

Closed as not planned

Description

@shao-zhijie

Summary

On OpenClaw 2026.6.1 with the feishu channel, calling skill_workshop action=apply from the agent returns:

Plugin approval unavailable (no approval route)

The proposal stays pending forever. The agent's apply call returns immediately (no 120s timeout) — distinct from #91890's qqbot symptom.

This is related to but distinct from #91890 (qqbot missing approvalCapability). My feishu channel DOES have approvalCapability registered (confirmed in dist/channel-BdCNfSn6.js — approvalCapability: feishuApprovalAuth), yet the approval route still doesn't return a usable decision.

Environment

  • OpenClaw 2026.6.1 (commit 2e08f0f)
  • feishu channel (direct chat)
  • skills.workshop.approvalPolicy: "auto" (set in config, but doesn't help)
  • agent model: minimax-portal/MiniMax-M3

Reproduction

  1. Connect a feishu bot to OpenClaw 2026.6.1
  2. As agent, call skill_workshop action=create name=foo ... — succeeds, proposal pending
  3. As agent, call skill_workshop action=apply proposal_id=... — fails immediately

Expected

A native approval card surfaces in the feishu conversation with title "Apply workspace skill proposal" and buttons allow-once / deny. Click writes the decision back to proposal.json and applies the skill.

Actual

apply returns immediately:

{"status":"error","tool":"skill_workshop","error":"Plugin approval unavailable (no approval route)"}

No card is rendered. Proposal remains pending forever.

Root cause (from dist/agent-tools.before-tool-call-CDXSxqiL.js)

const requestResult = await callGatewayTool("plugin.approval.request", ...);
const hasImmediateDecision = Object.hasOwn(requestResult ?? {}, "decision");
if (hasImmediateDecision) {
    decision = requestResult?.decision;
    if (decision === null) {
        return { ... reason: "Plugin approval unavailable (no approval route)" ... };
    }
}

requestResult.decision === null means the request RPC returned "no decision available right now" — the route exists but doesn't surface an approval card on feishu.

feishu's approvalCapability IS registered in the plugin descriptor (unlike qqbot's missing capability in #91890), so this is a different code path.

Workaround (confirmed working)

openclaw skills workshop apply <proposal-id> from CLI bypasses the agent approval route entirely. Proposal moves to applied, and the skill is written to skills/<name>/SKILL.md. This is the same workaround as #91890.

Suggested fix

Two layers:

  1. plugin.approval.request should either:
    • Surface an approval card on feishu (analogous to what 6.6.5 did for Google Chat)
    • Or throw a clearer error if no route is configured, rather than returning decision: null and being misinterpreted as "no approval route"
  2. Consider an approvalPolicy: "auto" fast-path that skips the request call entirely when the user has pre-approved. Current approvalPolicy: "auto" still walks through request before applying auto policy.

Related

Activity

  1. clawsweeper commented on Jun 11, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    Close as a duplicate of the canonical generic plugin-approval routing bug: the Feishu-specific symptom maps to the same missing turn-source metadata path tracked in #74003, with #90918 already carrying the focused repair path.

    Canonical path: Use #74003 as the canonical route-metadata bug, review or replace #90918, and keep broader chat approval-evidence design in #93048.

    So I’m closing this here and keeping the remaining discussion on #74003, #90918, and #93048.

    Review details

    Best possible solution:

    Use #74003 as the canonical route-metadata bug, review or replace #90918, and keep broader chat approval-evidence design in #93048.

    Do we have a high-confidence way to reproduce the issue?

    Yes. Source inspection shows the current before_tool_call plugin approval request omits the turn-source fields, and the gateway returns decision: null when no approval client, forwarder delivery, or turn-source route exists; I did not run a live Feishu bot flow in this read-only review.

    Is this the best way to solve the issue?

    Yes. Forwarding existing turn-source metadata into the existing plugin.approval.request contract is the narrow maintainable fix; Feishu-specific routing or a missing-config approval bypass would be the wrong layer.

    Security review:

    Security review needs attention: The issue touches the approval boundary for Skill Workshop lifecycle actions, so the canonical fix must route approval instead of weakening the pending default.

    • [medium] Preserve lifecycle approval while fixing routing — src/skills/workshop/policy.ts:60
      Any repair should deliver or wait for the approval route and must not treat missing config or missing delivery as permission to apply, reject, or quarantine generated skills.
      Confidence: 0.9

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • joshavant: Authored and merged the before_tool_call async requireApproval feature and plugin approval request path now missing route forwarding. (role: feature introducer; confidence: high; commits: 6ade9c474cf1; files: src/agents/agent-tools.before-tool-call.ts, src/gateway/server-methods/plugin-approval.ts, src/infra/exec-approval-forwarder.ts)
    • steipete: Authored same-chat approval routing work and shared approval helper refactors adjacent to the no-route decision path. (role: approval routing contributor; confidence: high; commits: 574d3c521358, bb01e49192d3; files: src/infra/approval-turn-source.ts, src/gateway/server-methods/approval-shared.ts, src/gateway/server-methods/plugin-approval.ts)
    • 849261680: Authored the open canonical fix PR that forwards turn-source routing fields and adds gateway proof for the generic no-route bug. (role: likely follow-up owner; confidence: medium; commits: baa2f8587f1c, e77b81ec0522; files: src/agents/agent-tools.before-tool-call.ts, src/agents/agent-tools.ts, src/gateway/server-methods/plugin-approval-turn-source-routing.e2e.test.ts)
    • vincentkoc: Recently worked on forwarding channel identity into agent hook contexts, which is adjacent to the missing approval routing metadata boundary. (role: recent adjacent contributor; confidence: medium; commits: 60e818f563d8; files: src/agents/harness/hook-context.ts, src/plugins/hook-agent-context.ts, src/agents/cli-runner.ts)

    Codex review notes: model internal, reasoning high; reviewed against 794bd89fa030.

  2. added
    P2Normal backlog priority with limited blast radius.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    on Jun 15, 2026
  3. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions