[GH-ISSUE #284] feat: hook/plugin support for command and tool-result interception #197

Open
opened 2026-10-18 14:03:44 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Classic298 on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/284

Cptr has no hook or plugin system: no command interception before execution, no third-party tool registration, no post-response callbacks. The two plugin-ish features that exist (skills and MCP) don't cover this gap — skills are prompt-guidance bundles with optional scripts, MCP adds tools but nothing runs around cptr's own tools.

The consequence is that a whole class of tools can't integrate at all. Anything that works by observing or rewriting commands before they run — output filters, audit loggers, policy engines, sandbox wrappers — has no entry point. Concrete example: rtk (github.com/rtk-ai/rtk, single Rust binary, ~80k stars) compresses shell output before the agent reads it, and integrates with 18 agents (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, ...) through exactly this kind of hook/plugin API. For agents without hook support it ships an awareness mode where the agent prefixes rtk itself — so cptr users can hand-run rtk git status through run_command today, but there's no way to get the automatic interception the other 18 tools have.

What a minimal useful version looks like, in rough order of value:

  1. Command hooks — a config like [[hooks]] with command pattern, e.g. rewrite or veto a run_command call before it executes (PreToolUse-style, or post-fact output filtering on the result). This alone unblocks rtk-style filters and audit logging.
  2. Tool-result hooks — a function that sees every tool response after it returns, before it's handed to the model (also where output-truncation behavior could become pluggable).
  3. Plugin packaging — a folder or manifest that can ship hooks + skills + MCP servers together, so integrations install with one step instead of three.

Not asking for the full Claude Code hook surface (session lifecycle, stop hooks, subagent events). The three above would cover most real integrations.

Related: #217 (agent-plugins.org direction, complementary rather than the same ask — that covers plugin discovery/packaging, this is about the hook API inside cptr).

Originally created by @Classic298 on GitHub (Sep 20, 2026). Original GitHub issue: https://github.com/open-webui/computer/issues/284 Cptr has no hook or plugin system: no command interception before execution, no third-party tool registration, no post-response callbacks. The two plugin-ish features that exist (skills and MCP) don't cover this gap — skills are prompt-guidance bundles with optional scripts, MCP adds tools but nothing runs *around* cptr's own tools. The consequence is that a whole class of tools can't integrate at all. Anything that works by observing or rewriting commands before they run — output filters, audit loggers, policy engines, sandbox wrappers — has no entry point. Concrete example: `rtk` (github.com/rtk-ai/rtk, single Rust binary, ~80k stars) compresses shell output before the agent reads it, and integrates with 18 agents (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, ...) through exactly this kind of hook/plugin API. For agents without hook support it ships an awareness mode where the agent prefixes `rtk` itself — so cptr users can hand-run `rtk git status` through run_command today, but there's no way to get the automatic interception the other 18 tools have. What a minimal useful version looks like, in rough order of value: 1. **Command hooks** — a config like `[[hooks]]` with `command` pattern, e.g. rewrite or veto a run_command call before it executes (PreToolUse-style, or post-fact output filtering on the result). This alone unblocks rtk-style filters and audit logging. 2. **Tool-result hooks** — a function that sees every tool response after it returns, before it's handed to the model (also where output-truncation behavior could become pluggable). 3. **Plugin packaging** — a folder or manifest that can ship hooks + skills + MCP servers together, so integrations install with one step instead of three. Not asking for the full Claude Code hook surface (session lifecycle, stop hooks, subagent events). The three above would cover most real integrations. Related: #217 (agent-plugins.org direction, complementary rather than the same ask — that covers plugin *discovery/packaging*, this is about the hook *API inside cptr*).
Author
Owner

@owui-terminator[bot] commented on GitHub (Sep 20, 2026):

🔍 Related Issues Found

I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:

  1. 🟢 #217 feat: agent plugin
    This is the closest match: it proposes an agent plugin system and links to agent-plugins.org, which aligns with the packaging/discovery side of the request. The new issue is more specific about hook APIs inside cptr, but they are clearly adjacent and likely part of the same broader plugin direction.
    by tjbck

💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.

This comment was generated automatically. React with 👍 if helpful, 👎 if not.

<!-- gh-comment-id:5753252193 --> @owui-terminator[bot] commented on GitHub (Sep 20, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟢 [#217](https://github.com/open-webui/computer/issues/217) **feat: agent plugin** *This is the closest match: it proposes an agent plugin system and links to agent-plugins.org, which aligns with the packaging/discovery side of the request. The new issue is more specific about hook APIs inside cptr, but they are clearly adjacent and likely part of the same broader plugin direction.* *by tjbck* --- 💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead. *This comment was generated automatically.* React with 👍 if helpful, 👎 if not.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/computer#197
No description provided.