anomalyco / anomalyco/opencode

Feature Request: DAP Debugger Integration & Advisor Model

Open
#39,253 2 comments 1 reaction 1 assignee View on GitHub

@jlongster is already working on this.

Since Jul 28, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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

Feature 1: DAP Debugger Integration

Inspired by: oh-my-pi (omp)

omp integrates the Debug Adapter Protocol (DAP) to drive real debuggers — lldb, delve (dlv), debugpy — with support for breakpoints, stepping, threads, stack frames, and variable inspection (28 DAP operations). The agent can attach to a running process, pause execution, inspect state, and continue — all without the developer leaving the terminal.

Proposed implementation
  • Add a debug tool that connects to DAP-compatible adapters
  • Support breakpoint management (set, list, remove)
  • Implement stepping (continue, step over, step into, step out)
  • Expose threads, stack frames, and scoped variables
  • Allow the agent to evaluate expressions in the debug context
Why this matters

Most coding agents stop at "add print statements." A built-in debugger would let OpenCode diagnose crashes, inspect runtime state, and fix logic errors autonomously — a significant capability gap vs. omp.


Feature 2: Advisor / Reviewer Model

Inspired by: oh-my-pi (omp)

omp supports a secondary advisor model that silently observes every turn the main agent takes. It runs on its own context and model, injecting inline notes — a quiet aside, a concern, or a hard blocker — when the primary agent misses something.

Proposed implementation
  • Add an advisor configuration section in opencode.json to specify a secondary model
  • The advisor reads each turn (user prompt + agent response) in the background
  • It can emit structured feedback: info, concern, or blocker
  • Feedback is rendered inline in the TUI
  • The main agent can optionally auto-incorporate feedback
Why this matters

A second set of eyes catches edge cases, security issues, and logical errors the primary agent rushed past. Especially valuable for complex multi-step tasks.


Both features are inspired by oh-my-pi (omp)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.