DeepCode
DeepCode copied to clipboard
[Question]: Deep code running but not working
Do you need to ask a question?
- [ ] I have searched the existing question and discussions and this question is not already answered.
- [ ] I believe this is a legitimate question, not just a bug or feature request.
Your Question
Deep code is running but whenever I give any prompt, the AI models give error that AI layer could not be activated. What is the issue here and how should I resolve it?
Additional Context
No response
Could you share some error details so I can check what’s going on?
mcp-agent-20250902_224628.json mcp_agent.config.yaml
Having similar issues. Might be related. Asked claude to look at the logs, and here's his theory if it's helpful:
## **Root Cause Analysis - Why the MCP Agent Failed**
Based on the evidence I've gathered, here's what's happening:
### **The Problem: `gpt-5-mini` + `tools` + `reasoning_effort` = Timeout/Hang**
The MCP agent framework is trying to make an OpenAI API call with this combination:
- Model: `gpt-5-mini`
- `reasoning_effort: "medium"`
- Tools (Brave search tools)
- High `max_completion_tokens: 4096`
**This specific combination is causing the request to hang/timeout**, which the MCP agent interprets as a "Connection error."
`[ERROR] 2025-09-02T22:46:33 mcp_agent.workflows.llm.augmented_llm_openai.ChatPlanningAgent - Error: Connection error.`
### **Why This Happens**
1. **OpenAI Reasoning Models + Tools Issue**: There appears to be an issue where reasoning models (`gpt-5-mini`, `o1`, `o3`) can hang when used with function calling/tools, especially with higher reasoning effort levels
2. **MCP Agent Timeout**: The MCP agent framework doesn't handle these timeouts gracefully and reports them as "Connection error"
3. **Async Context Issues**: The combination of Streamlit's async context + MCP's async context + OpenAI's async client with reasoning models creates a problematic scenario
### **The Solutions**
**Technical Fix**: Modify the MCP agent to not use `reasoning_effort` when tools are present, or add better timeout handling.
The simplest solution is to change the model to `gpt-4` since your use case (planning agent) doesn't necessarily require the reasoning capabilities that are causing this conflict.
But I manually tested my openai and anthropic keys and both were working, so might not be a gpt-5-issue
Could you share some error details so I can check what’s going on?
Error: Chat planning agent returned empty result
The issue has been solved, you can update the new version of deepcode! Thank you!