Repository navigation
Closed
Description
Environment
- OpenCode Version: 0.3.130
- OS: Windows with WSL2 -
Linux 6.6.87.2-microsoft-standard-WSL2 - Platform: linux x86-64
Issue Description
OpenCode hangs indefinitely when attempting to send messages to the Anthropic API. This was working before but
suddenly stopped working. Authentication works correctly, models are detected, but any actual API request never
completes.
Steps to Reproduce
- Fresh install:
curl -fsSL https://opencode.ai/install | bash - Authentication successful:
opencode auth login(OAuth flow completed) - Verified auth:
opencode auth list✅ Shows Anthropic provider configured - Started OpenCode:
opencode --print-logs --log-level DEBUG - Sent any message → Hangs forever
What Works ✅
- Installation and setup
- Authentication (OAuth tokens present in
~/.local/share/opencode/auth.json) - Provider detection (
opencode auth listshows Anthropic) - Model detection (logs show
claude-sonnet-4-20250514andclaude-3-5-haiku-20241022found) - TUI initialization
- Session creation and management
What Fails ❌
- Any actual API request to Anthropic hangs indefinitely
- No error messages or timeouts
- Process must be killed manually
Debug Information
Auth Status:
{
"anthropic": {
"type": "oauth",
"refresh": "sk-ant-ort01-[REDACTED]",
"access": "sk-ant-oat01-[REDACTED]",
"expires": 1754419110820
}
}
Last Log Entries Before Hang:
INFO 2025-08-05T10:53:07 +1ms service=provider providerID=anthropic modelID=claude-sonnet-4-20250514 getModel
INFO 2025-08-05T10:53:07 +0ms service=provider status=started providerID=anthropic getSDK
INFO 2025-08-05T10:53:07 +84ms service=provider status=completed duration=84 providerID=anthropic getSDK
INFO 2025-08-05T10:53:07 +0ms service=provider providerID=anthropic modelID=claude-sonnet-4-20250514 found
INFO 2025-08-05T10:53:07 +3ms service=session session=ses_78622ef09ffe1I46xY5lno4Sx4
sessionID=ses_78622ef09ffe1I46xY5lno4Sx4 locking
INFO 2025-08-05T10:53:07 +3ms service=provider providerID=anthropic modelID=claude-3-5-haiku-20241022 getModel
INFO 2025-08-05T10:53:07 +0ms service=provider status=started providerID=anthropic getSDK
INFO 2025-08-05T10:53:07 +0ms service=provider status=completed duration=0 providerID=anthropic getSDK
INFO 2025-08-05T10:53:07 +0ms service=provider providerID=anthropic modelID=claude-3-5-haiku-20241022 found
INFO 2025-08-05T10:53:08 +986ms service=bus type=storage.write publishing
INFO 2025-08-05T10:53:08 +0ms service=bus type=session.updated publishing
[HANGS HERE - NO FURTHER LOGS]
Additional Context
This was working fine previously but suddenly stopped working. We're on Windows using WSL2. Happy to test any
fixes or provide additional debugging information if needed.Metadata
Metadata
Assignees
Labels
No labels
Activity
thdxr commentedon Aug 5, 2025
i need full logs can you do
opencode run hey --print-logsthdxr commentedon Aug 5, 2025
btw can you test if it works with an api key?
plappag commentedon Aug 5, 2025
Ok, not entirely sure what happened, it works now with opencode --hostname 0.0.0.0, it also worked on Windows side when I downloaded the binary. Hope this helps someone, if it was my fault my bad haha 😂