Skip to content

[FEATURE]: Design V2 plugin request hooks #34490

Closed as not planned
Closed as not planned

Description

@opencode-agent

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Design plugin hooks for modifying or inspecting the model request/context before an LLM call.

This is intentionally a placeholder/design issue that needs follow-up with concrete use cases.

Use cases raised in discussion:

  • Append to or replace pieces of system context.
  • Remove or redact sensitive information before model calls.
  • Apply model/provider-specific request shaping that used to live in large transform logic.
  • Support plugin behavior that runs at request time rather than only during startup/config loading.

Expected scope:

  • Gather 3-5 concrete plugin/request transform use cases.
  • Decide hook timing and data shape.
  • Decide whether hooks can mutate, replace, or return contributions.
  • Define safety/ordering/error semantics.
  • Split implementation issues once the design is clear.

Activity

  1. github-actions commented on Jun 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. eXamadeus commented on Jul 1, 2026

    @eXamadeus
    Contributor

    @StarpTech if this isn't the place to post this, feel free to direct me elsewhere and/or delete this comment.

    That said, I've had a long standing desire to see a particular use case supported by the plugin ecosystem, which is proper orchestration (HITL, agent routing, etc) controls via the plugin API. If you're still looking for concrete use cases, I would be glad to detail out some of my thoughts around the plugin I've envisioned, the current shortfalls of v1, and what primitives/hooks would be needed to fully support proper orchestration via plugins.

    Also, it's worth noting that the plugin I envisioned is slightly broader in scope than just request hooks, but I think this is the core area where it might be relevant. If that sounds at all relevant, let me know and we I'd be delighted to discuss it further.

  3. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Tracker update from V2 TODO LIST audit (2026-07-02):

    Related current work:

    This issue should remain open for broader request hooks unless #34709/#34805 intentionally cover the desired hook surface. If the remaining requirement is specifically request-time model/provider hooks, please narrow this issue after those PRs land.

  4. opencode-agent commented on Jul 5, 2026

    @opencode-agent
    ContributorAuthor

    Superseded by #35408, which defines the V2 model-context plugin hook, backend placement, complete context shape, ordering/settlement requirements, and built-in migration work in concrete terms. Closing this placeholder in favor of that implementation tracker.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions