Skip to content

Conversation

@Eric-Guo
Copy link
Contributor

When I writing my agent with markdown, I constently found I need to ask LLM to list your current available tools, I guess it should be a dedicated command.

opencode debug agent plan
{
  "name": "plan",
  "options": {},
  "permission": {
    "edit": "deny",
    "webfetch": "allow",
    "bash": {
      "*": "ask",
      "cut*": "allow",
      "diff*": "allow",
      "du*": "allow",
      "file *": "allow",
      "find * -delete*": "ask",
      "find * -exec*": "ask",
      "find * -fprint*": "ask",
      "find * -fls*": "ask",
      "find * -fprintf*": "ask",
      "find * -ok*": "ask",
      "find *": "allow",
      "git diff*": "allow",
      "git log*": "allow",
      "git show*": "allow",
      "git status*": "allow",
      "git branch": "allow",
      "git branch -v": "allow",
      "grep*": "allow",
      "head*": "allow",
      "less*": "allow",
      "ls*": "allow",
      "more*": "allow",
      "pwd*": "allow",
      "rg*": "allow",
      "sort --output=*": "ask",
      "sort -o *": "ask",
      "sort*": "allow",
      "stat*": "allow",
      "tail*": "allow",
      "tree -o *": "ask",
      "tree*": "allow",
      "uniq*": "allow",
      "wc*": "allow",
      "whereis*": "allow",
      "which*": "allow"
    },
    "skill": {
      "*": "allow"
    }
  },
  "tools": {
    "invalid": true,
    "bash": true,
    "read": true,
    "glob": true,
    "grep": true,
    "edit": false,
    "write": false,
    "task": true,
    "webfetch": true,
    "todowrite": true,
    "todoread": true,
    "websearch": true,
    "codesearch": true,
    "skill": true,
    "doc_convert": true,
    "internal_search_internal_search": true,
    "websearch_for_china_net": true
  },
  "mode": "primary",
  "native": true,
  "toolOverrides": {}
}

Copilot AI review requested due to automatic review settings December 31, 2025 14:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new debug agent <name> subcommand that displays comprehensive agent configuration details including resolved tools, permissions, and tool overrides. This helps developers debug agent configurations when working with markdown-defined agents.

Key changes:

  • New debug agent <name> command that outputs agent details in JSON format
  • Integration of the command into the existing debug command hierarchy

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/opencode/src/cli/cmd/debug/index.ts Imports and registers the new AgentCommand in the debug command structure
packages/opencode/src/cli/cmd/debug/agent.ts Implements the new agent debug command with tool resolution logic and error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit b97d20f into anomalyco:dev Dec 31, 2025
2 checks passed
burgercrisis pushed a commit to burgercrisis/opencode that referenced this pull request Dec 31, 2025
hk9890 pushed a commit to hk9890/opencode that referenced this pull request Jan 1, 2026
dl-alexandre pushed a commit to dl-alexandre/opencode that referenced this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants