Position Analysis shows 'Analysis system temporarily unavailable' error on Netflix position details view
Bug Description
Component: UI Component - Position Analysis Panel
Summary: Position Analysis button doesn't work properly on Netflix position from details view
Environment
- Plugin Version: compound-engineering@2.19.0
- Claude Code Version: 2.1.29
- OS: Darwin 25.1.0 (macOS - ARM64)
What Happened
When clicking the Position Analysis button on the Netflix position from the details view (/trades/2026-01-30-NFLX-LEAP-114-call), the analysis panel opens but displays an error:
Risk Flags:
- ⚠️ warning: Analysis system temporarily unavailable
The panel also shows a fallback analysis with:
- Recommendation: HOLD
- Confidence: 5/10
- Reasoning: "Position analysis unavailable - using fallback recommendation"
Expected Behavior
The analysis panel should open and successfully analyze the position using the Claude Agent SDK, displaying:
- Market data analysis
- IV context analysis
- Technical analysis
- A proper recommendation with reasoning based on actual analysis
Steps to Reproduce
- Navigate to the Netflix LEAP position:
/trades/2026-01-30-NFLX-LEAP-114-call - Click the "Analyze position with AI" button on the details view
- Observe that the panel opens but shows "Analysis system temporarily unavailable" warning
Technical Context
The position analysis was recently migrated from @anthropic-ai/sdk to @anthropic-ai/claude-agent-sdk to eliminate the need for API keys. The Agent SDK integration is working correctly (panel opens, progress steps animate), but the actual analysis is timing out or failing, resulting in the fallback response.
Potential causes:
- Agent SDK subprocess timeout (known issue #771)
- Missing or invalid
claude logincredentials - Agent SDK taking longer than the 60-second timeout
- The orchestrator's
query()call is not receiving valid responses from the Agent SDK
Error Messages
No JavaScript console errors. The API returns a fallback analysis:
\\\json\
{
"type": "result",
"result": {
"recommendation": "HOLD",
"confidence": 5,
"reasoning": [
"Position analysis unavailable - using fallback recommendation",
"348 days until expiration",
"Monitor position closely and reassess"
],
"riskFlags": [{
"severity": "warning",
"message": "Analysis system temporarily unavailable"
}],
"marketContext": {
"ivRank": 50,
"trend": "neutral",
"keyLevels": []
}
}
}
\\
Additional Context
- The Agent SDK integration works on other positions (tested with TSLA)
- This may be specific to the Netflix position or may be a systematic issue
- The fallback mechanism is working correctly (graceful degradation)
- Tests pass (51/51), so the issue appears to be runtime-specific
Related Files
dashboard/src/lib/agents/orchestrator.ts- Agent SDK query implementationdashboard/src/app/api/analyze/route.ts- SSE endpoint with 60s timeoutdashboard/src/components/AnalysisPanel.tsx- UI panel component
---
Reported via compound-engineering plugin bug reporting tool
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗