-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Open
Description
Description
The opencode run command fails immediately with "Session not found" error. This affects all variations of the command.
Environment
- opencode version: 1.1.16
- macOS (Apple Silicon)
- Installed via Homebrew
Reproduction Steps
# Basic usage
opencode run "Hello"
# Output: Error: Session not found
# With model
opencode run "Hello" -m anthropic/claude-haiku-4-5-20251001
# Output: Error: Session not found
# With agent
opencode run "Hello" --agent build-haiku
# Output: Error: Session not found
# From clean directory
cd /tmp && opencode run "Hello"
# Output: Error: Session not found
# With explicit port
opencode run "Hello" --port 14567
# Output: Error: Session not foundDebug Logs
Running with --print-logs shows:
INFO ... service=file.watcher platform=darwin backend=fs-events watcher backend
ERROR ... service=server error= failed
Error: Session not found
Note the empty error message in service=server error= failed.
Expected Behavior
The command should start a new session and process the message.
Impact
This prevents:
- Non-interactive/scripted use of opencode
- CI/CD integrations
- Programmatic invocation of specific agents
Metadata
Metadata
Assignees
Labels
No labels