Skip to content

V2: revisit tool plugin APIs and execute integration architecture #35364

Description

@opencode-agent

Summary

Revisit the V2 tool APIs introduced to integrate CodeMode execute, and restructure the integration so it follows V2's intended plugin, registry, runner, and event patterns.

The current implementation works, but parts of the integration are intentionally expedient. Before treating it as the long-term pattern, we should review the public/internal tool APIs and remove special-case or synthetic wiring we do not want other tools to copy.

Review scope

  • audit the tool APIs and seams added for feat(core): expose deferred tools through execute #35361
  • decide whether execute should be a normal tool plugin, a registry/materialization adapter, or another explicit abstraction
  • align deferred-tool discovery with the supported plugin API
  • remove special-case Core/MCP wiring where a general mechanism should exist
  • verify permission propagation, child-call identity, progress, cancellation, errors, metadata, and attachments
  • keep nested execution observable without leaking CodeMode-specific concerns into the generic tool API
  • define which APIs are public for plugins versus internal implementation details
  • add focused architecture and integration tests around the chosen shape

Acceptance criteria

  • the team agrees on the long-term V2 tool/plugin API shape used by execute
  • execute is implemented through that shape without one-off registry/runner hooks
  • Core tools, MCP tools, and external plugin tools follow consistent discovery and execution rules
  • progress support composes with the separate progressive-tool-update design
  • current CodeMode behavior remains covered by tests

Related

Source: https://discord.com/channels/1391832426048651334/1520962938733723720/1523078773669367919

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.0coreAnything pertaining to core functionality of the application (opencode server stuff)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions