Skip to content

Commit d63d170

Browse files
committed
docs(readme): add Troubleshooting section with common error codes
Signed-off-by: leocavalcante <[email protected]>
1 parent 8ef7d9a commit d63d170

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,44 @@ Log output format:
168168
}
169169
```
170170

171+
## Troubleshooting
172+
173+
If you encounter errors during installation, here are common error codes and their solutions:
174+
175+
| Error Code | Message | Solution |
176+
|------------|---------|----------|
177+
| `EACCES` | Permission denied | Check write permissions for `~/.config/opencode/agents/`. Run `chmod -R u+w ~/.config/opencode/` or use `sudo` if needed. |
178+
| `EPERM` | Operation not permitted | The file may be locked or in use. Close any editors or applications using the agent files and try again. |
179+
| `ENOSPC` | Disk full | Free up disk space and retry the installation. |
180+
| `EROFS` | Read-only file system | The target directory is on a read-only filesystem. Remount with write permissions or choose a different config location. |
181+
| `EAGAIN` | Resource temporarily unavailable | A transient error. The installer retries automatically, but if it persists, wait a moment and try again. |
182+
| `EBUSY` | File is busy or locked | Another process is using the file. Close any applications that might have the agent files open. |
183+
| `ENOENT` | Source file not found | The agent source files are missing from the package. Try reinstalling with `bun add opencode-plugin-opencoder`. |
184+
| `EEXIST` | Target already exists | An agent file already exists. The installer should handle this, but you can manually remove files in `~/.config/opencode/agents/` if needed. |
185+
| `EMFILE` / `ENFILE` | Too many open files | System file descriptor limit reached. Close some applications or increase your system's `ulimit`. |
186+
| `EISDIR` | Expected file but found directory | A directory exists where an agent file should be. Remove the conflicting directory from `~/.config/opencode/agents/`. |
187+
188+
### Manual Recovery
189+
190+
If automatic installation fails, you can manually copy the agents:
191+
192+
```bash
193+
# Create the agents directory
194+
mkdir -p ~/.config/opencode/agents
195+
196+
# Copy agents from the installed package
197+
cp node_modules/opencode-plugin-opencoder/agents/*.md ~/.config/opencode/agents/
198+
```
199+
200+
### Verifying Installation
201+
202+
Check that agents were installed correctly:
203+
204+
```bash
205+
ls -la ~/.config/opencode/agents/
206+
# Should show: opencoder.md, opencoder-planner.md, opencoder-builder.md
207+
```
208+
171209
## Development
172210

173211
```bash

0 commit comments

Comments
 (0)