Skip to content

Add OpenCode agent support and allow enable without hook installation#315

Open
MementoMori123 wants to merge 2 commits intoentireio:mainfrom
MementoMori123:main
Open

Add OpenCode agent support and allow enable without hook installation#315
MementoMori123 wants to merge 2 commits intoentireio:mainfrom
MementoMori123:main

Conversation

@MementoMori123
Copy link

@MementoMori123 MementoMori123 commented Feb 12, 2026

Relates to #266

Summary

Adds OpenCode as a supported agent so Entire can be used in OpenCode projects. OpenCode is detected via .opencode/ or opencode.json. Because OpenCode is expected to integrate via its own plugin (calling entire hooks ...), this agent does not install or manage hooks; the setup flow is updated so entire enable can succeed for such agents.

Changes

  • New agent: OpenCode (cmd/entire/cli/agent/opencode/)

    • Implements the Agent interface: detection, session ID transform, session dir resolution, protected dirs (.opencode), and resume command.
    • SupportsHooks() returns false; hook input parsing is unimplemented (returns a clear error if used).
    • Session read/write is implemented as a passthrough of OpenCode’s on-disk format so future hook/plugin integration can be added without changing this contract.
  • Setup behavior

    • Agents that do not support hooks (e.g. OpenCode) can complete entire enable without installing hooks. Entire’s git hooks and strategy setup still run; only agent-specific hook installation is skipped.
    • Message when no hooks are installed is updated to: “Hooks for … already installed or managed externally” so it’s accurate for both “already installed” and “managed by the agent/plugin elsewhere.”
  • Registration

    • OpenCode is registered in the agent registry and wired in config.go and hooks_cmd.go so it is discoverable and usable when OpenCode (or its plugin) invokes the CLI.

Testing

  • mise run test (unit tests including new registry test for opencode).
  • Manual: entire enable in a repo with .opencode/ or opencode.json completes successfully and does not require hook support.

hello hello and others added 2 commits February 11, 2026 18:53
This commit introduces the OpenCodeAgent, which implements the Agent interface for the Entire CLI. The new agent supports detection of OpenCode presence in repositories, manages session data, and provides methods for reading and writing session information. It also includes configuration handling and session ID transformations, laying the groundwork for future integration with OpenCode's plugin system.
Add OpenCodeAgent implementation for Entire CLI
@MementoMori123 MementoMori123 requested a review from a team as a code owner February 12, 2026 21:54
@khaong
Copy link
Contributor

khaong commented Feb 17, 2026

Thanks for this! We're currently reworking the agent interface (#281) so we're holding agent PRs until that lands — otherwise the work would need to be redone against the new interface.

Heads up there are a few other OpenCode PRs in flight (#220, #257, #341) — we'll evaluate them together once #281 is done. We'll update #281 when it's ready for contributions.

@khaong khaong added on-hold Blocked on other work agent-support adding support for additional AI agents competing-pr Multiple PRs addressing the same thing — needs team decision labels Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-support adding support for additional AI agents competing-pr Multiple PRs addressing the same thing — needs team decision on-hold Blocked on other work

Development

Successfully merging this pull request may close these issues.

2 participants

Comments