[PR #13692] feat: add reference agent for searching external repositories #14775

Open
opened 2026-02-16 18:19:32 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13692

State: open
Merged: No


Summary

  • Adds ability to configure external git repositories or local paths in opencode.json under a new references field
  • Creates a reference subagent that can search across referenced projects using glob, grep, and read tools
  • Git references are automatically cloned (shallow) to a cache directory and kept fresh (stale threshold: 1 hour)
  • Supports branch specification via url#branch syntax

Example Configuration

{
  "references": [
    "git@github.com:Effect-TS/effect.git",
    "https://github.com/some/repo#main"
  ]
}

This enables querying external codebases without needing to clone them locally or add them as workspace dependencies.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13692 **State:** open **Merged:** No --- ## Summary - Adds ability to configure external git repositories or local paths in `opencode.json` under a new `references` field - Creates a `reference` subagent that can search across referenced projects using glob, grep, and read tools - Git references are automatically cloned (shallow) to a cache directory and kept fresh (stale threshold: 1 hour) - Supports branch specification via `url#branch` syntax ## Example Configuration ```json { "references": [ "git@github.com:Effect-TS/effect.git", "https://github.com/some/repo#main" ] } ``` This enables querying external codebases without needing to clone them locally or add them as workspace dependencies.
yindo added the pull-request label 2026-02-16 18:19:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14775