Skip to content
Back to skills

Opencode Log Investigation

ASecurity

Investigates OpenCode runtime errors by locating and analyzing log files. Use when OpenCode fails to start, plugins do not load, MCP servers error out, or terminal shows cryptic errors without details.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 3, 2026
developmentpythonshellbashdebugging

Works with

  • terminal
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add atman-33/workhub --skill opencode-log-investigation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Opencode Log Investigation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Opencode Log Investigation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/atman-33-opencode-log-investigation/badge)](https://www.skillsdirectory.com/skills/atman-33-opencode-log-investigation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: opencode-log-investigation
description: Investigates OpenCode runtime errors by locating and analyzing log files. Use when OpenCode fails to start, plugins do not load, MCP servers error out, or terminal shows cryptic errors without details.
---

# OpenCode Log Investigation

## Quick start

1. Identify the latest log file:
   - **Windows:** `%USERPROFILE%\.local\share\opencode\log\`
   - **Linux/macOS:** `~/.local/share/opencode/log/`
2. Open the most recent `YYYY-MM-DDTHHMMSS.log`.
3. Search for `ERROR` lines to find the root cause.

## Workflows

### 1. Plugin loading issues

1. Search for `service=plugin` in the log.
2. Check if the target plugin appears as `loading plugin`.
3. If absent, verify `opencode.json` has the plugin in the `plugin` array.
4. If present but errors follow, inspect the stack trace immediately after the load line.

### 2. MCP server failures

1. Search for `service=mcp` and `ERROR`.
2. Common errors:
   - `MCP error -32000: Connection closed` → the command failed to start.
   - `The system cannot find the path specified` → the executable (e.g., `/bin/bash`, `uvx`) is missing or not in PATH.
3. Check the `command=` field in the error line to see the exact command invoked.

### 3. Session or tool errors

1. Search for `service=session` or `service=tool.registry`.
2. Look for `error=` or `failed` in the same block.
3. Cross-reference timestamps to match user-visible terminal errors with log entries.

### 4. Shell command errors inside plugins

1. If a plugin uses `ctx.$` to run shell commands, `console.error` output from the plugin may **not** appear in the OpenCode log.
2. Check the terminal output directly, or redirect plugin stderr to a temp file for debugging.
3. Verify the command exists in the OS PATH (e.g., `python3` vs `python` on Windows).

## Advanced features

- See [REFERENCE.md](REFERENCE.md) for a detailed error pattern catalog.
- For plugin-specific debugging, add `console.log` in the plugin and watch the terminal; OpenCode does not capture plugin stdout/stderr into its log file.

Files in this skill

  • REFERENCE.md2.2 KB
  • SKILL.md2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…