Do you need to file an issue?
Describe the bug
Using the latest version of DeepCode, the agent successfully generates the implementation plan but fails to produce any actual code files. The workflow seems to terminate prematurely due to a Python NameError.
Steps to reproduce
1 Clone the repository: git clone https://github.com/HKUDS/DeepCode.git
2 Create and activate a conda environment with Python 3.11.
3 Install dependencies: pip install deepcode-hku
4 Configure the settings and start the service via ./run.sh (The same issue occurs in the Docker environment).
5 Input a test prompt: "Write a test program that displays 'Test Successful'."
The agent generates the initial_plan.txt successfully. However, the code implementation phase fails, and no source code files are found in the workspace.
Log analysis shows the following error:
Error during code implementation workflow: name 'LoopDetector' is not defined
It appears that LoopDetector is either not imported or not defined in the code implementation module, causing the workflow to crash.
Expected Behavior
The agent should proceed from the planning stage to code synthesis and save the generated source code to the workspace.
DeepCode Config Used
Default config
Logs and screenshots
./run.sh
🚀 启动 DeepCode New UI...
✓ 使用 conda 环境: deepcode
📍 Python: /home/openclaw/anaconda3/envs/deepcode/bin/python
[1/2] 启动后端服务...
INFO: Will watch for changes in these directories: ['/home/openclaw/桌面/DeepCode/new_ui/backend']
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: Started reloader process [7370] using StatReload
INFO: Started server process [7373]
INFO: Waiting for application startup.
Starting DeepCode New UI Backend...
Project root: /home/openclaw/桌面/DeepCode
Backend dir: /home/openclaw/桌面/DeepCode/new_ui/backend
Mode: Development
INFO: Application startup complete.
✓ 后端已启动: http://localhost:8000
[2/2] 启动前端服务...
deepcode-new-ui@1.0.0 dev
vite
VITE v5.4.21 ready in 129 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
╔════════════════════════════════════════╗
║ DeepCode New UI 已启动! ║
╠════════════════════════════════════════╣
║ ║
║ 🌐 前端: http://localhost:5173 ║
║ 🔧 后端: http://localhost:8000 ║
║ 📚 API: http://localhost:8000/docs ║
║ ║
║ 按 Ctrl+C 停止所有服务 ║
╚════════════════════════════════════════╝
INFO: 127.0.0.1:40172 - "POST /api/v1/workflows/chat-planning HTTP/1.1" 200 OK
[03/17/26 11:55:23] INFO Registered plugin 'requirement_analysis' at before_planning base.py:231
INFO Registered plugin 'plan_review' at after_planning base.py:231
[WorkflowService] Plugin integration initialized
INFO Running hook before_planning with 1 plugin(s) base.py:299
INFO Running plugin 'requirement_analysis' base.py:314
[INFO] 2026-03-17T11:55:23 mcp_agent.core.context - Configuring logger with level: info
[INFO] 2026-03-17T11:55:23 mcp_agent.chat_planning - Loading subagents from configuration...
[INFO] 2026-03-17T11:55:23 mcp_agent.chat_planning - MCPApp initialized
{
"data": {
"progress_action": "Running",
"target": "chat_planning",
"agent_name": "mcp_application_loop",
"session_id": "fa01537b-ce6b-465d-99a5-f06b4d58b0d6"
}
}
🤖 Using OpenAIAugmentedLLM (user preference: openai)
[03/17/26 11:55:24] INFO RequirementAnalysisAgent initialized successfully requirement_analysis_agent.py:90
INFO Starting to generate AI precise guiding questions requirement_analysis_agent.py:115
INFO Calling LLM to generate precise questions, input length: 18 requirement_analysis_agent.py:143
INFO: 127.0.0.1:40176 - "WebSocket /ws/workflow/c125b670-1e96-4c18-b629-2071028e36fa" [accepted]
[WorkflowWS] Connected: task=c125b670...
[Subscribe] Success: task=c125b670... total_subscribers=1
[WorkflowWS] Subscribed: task=c125b670... queue=True task=True
INFO: connection open
INFO [mcp_agent.core.context] Configuring logger with level: info listeners.py:108
INFO: 127.0.0.1:45534 - "WebSocket /ws/code-stream/c125b670-1e96-4c18-b629-2071028e36fa" [accepted]
[Subscribe] Success: task=c125b670... total_subscribers=2
INFO: connection open
INFO [mcp_agent.chat_planning] Loading subagents from configuration... listeners.py:108
INFO [mcp_agent.chat_planning] MCPApp initialized listeners.py:108
[03/17/26 11:56:43] INFO HTTP Request: POST http://192.168.7.241:28000/chat/completions "HTTP/1.1 200 OK" _client.py:1740
INFO LLM returned result length: 589 requirement_analysis_agent.py:149
INFO LLM returned result: [ requirement_analysis_agent.py:157
{
"category": "Technology Selection",
"question": "程序需要在什么具体环境下运行(如命令行终端、Web 页面、桌面 GUI、移动端),首选编程语言是什么?",
"importance": "High",
"hint": "运行环境决定了代码框架、依赖库及打包方式的选择"
},
{
"category": "Functional Requirements",
"question": "'测试成功' 信息具体通过何种方式呈现(如控制台标准输出、图形界面弹窗、HTTP 响应体、或写入日志文件)?",
"importance": "High",
"hint": "明确输出形式决定了 I/O 操作、UI 组件或网络协议的使用"
},
{
"category": "Deployment Environment",
"question": "该程序是否需要集成到自动化流程中(如 CI/CD),执行成功后是否需要返回特定的退出码(Exit Code)...
INFO Extracted JSON: [ requirement_analysis_agent.py:170
{
"category": "Technology Selection",
"question": "程序需要在什么具体环境下运行(如命令行终端、Web 页面、桌面 GUI、移动端),首选编程语言是什么?",
"importance": "High",
"hint": "运行环境决定了代码框架、依赖库及打包方式的选择"
},
{
"categ...
INFO ✅ Successfully generated 3 AI precise guiding questions requirement_analysis_agent.py:179
[Broadcast] task=c125b670... type=interaction_required subscribers=2
[WorkflowWS] Sending: task=c125b670... type=interaction_required
INFO: 127.0.0.1:35058 - "POST /api/v1/workflows/respond/c125b670-1e96-4c18-b629-2071028e36fa HTTP/1.1" 200 OK
[WorkflowService] Requirements after plugin: 18 chars
🚀 Initializing chat-based planning and implementation pipeline
💬 Chat mode: Direct user requirements to code implementation
📁 Working environment: local
📂 Workspace directory: /home/openclaw/桌面/DeepCode/deepcode_lab
✅ Workspace status: ready
🧠 Running chat-based planning agent...
💬 Starting chat-based planning agent...
Input length: 18
Input preview: 编写一个测试程序,显示:“测试成功”...
🔍 Using search server: filesystem
[Broadcast] task=c125b670... type=progress subscribers=2
[Broadcast] task=c125b670... type=progress subscribers=2
[WorkflowWS] Sending: task=c125b670... type=progress
[INFO] 2026-03-17T11:57:34 mcp_agent.mcp.mcp_connection_manager - filesystem: Up and running with a persistent connection!
[WorkflowWS] Sending: task=c125b670... type=progress
[03/17/26 11:57:34] INFO [mcp_agent.mcp.mcp_connection_manager] filesystem: Up and running with a persistent connection! listeners.py:108
Secure MCP Filesystem Server running on stdio
No valid root directories provided by client
chat_planning: Connected to server, calling list_tools...
Tools available: {'meta': None, 'nextCursor': None, 'tools': [{'name': 'filesystem_read_file', 'title': 'Read File (Deprecated)', 'description': 'Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'tail': {'description': 'If provided, returns only the last N lines of the file', 'type': 'number'}, 'head': {'description': 'If provided, returns only the first N lines of the file', 'type': 'number'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_read_text_file', 'title': 'Read Text File', 'description': "Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Operates on the file as text regardless of extension. Only works within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'tail': {'description': 'If provided, returns only the last N lines of the file', 'type': 'number'}, 'head': {'description': 'If provided, returns only the first N lines of the file', 'type': 'number'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_read_media_file', 'title': 'Read Media File', 'description': 'Read an image or audio file. Returns the base64 encoded data and MIME type. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'array', 'items': {'type': 'object', 'properties': {'type': {'type': 'string', 'enum': ['image', 'audio', 'blob']}, 'data': {'type': 'string'}, 'mimeType': {'type': 'string'}}, 'required': ['type', 'data', 'mimeType'], 'additionalProperties': False}}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_read_multiple_files', 'title': 'Read Multiple Files', 'description': "Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'paths': {'minItems': 1, 'type': 'array', 'items': {'type': 'string'}, 'description': 'Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories.'}}, 'required': ['paths']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_write_file', 'title': 'Write File', 'description': 'Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'content': {'type': 'string'}}, 'required': ['path', 'content']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': True, 'idempotentHint': True, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_edit_file', 'title': 'Edit File', 'description': 'Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'edits': {'type': 'array', 'items': {'type': 'object', 'properties': {'oldText': {'type': 'string', 'description': 'Text to search for - must match exactly'}, 'newText': {'type': 'string', 'description': 'Text to replace with'}}, 'required': ['oldText', 'newText']}}, 'dryRun': {'default': False, 'description': 'Preview changes using git-style diff format', 'type': 'boolean'}}, 'required': ['path', 'edits']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': True, 'idempotentHint': False, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_create_directory', 'title': 'Create Directory', 'description': 'Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': False, 'idempotentHint': True, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_list_directory', 'title': 'List Directory', 'description': 'Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_list_directory_with_sizes', 'title': 'List Directory with Sizes', 'description': 'Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'sortBy': {'default': 'name', 'description': 'Sort entries by name or size', 'type': 'string', 'enum': ['name', 'size']}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_directory_tree', 'title': 'Directory Tree', 'description': "Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'excludePatterns': {'default': [], 'type': 'array', 'items': {'type': 'string'}}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_move_file', 'title': 'Move File', 'description': 'Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'source': {'type': 'string'}, 'destination': {'type': 'string'}}, 'required': ['source', 'destination']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': False, 'idempotentHint': False, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_search_files', 'title': 'Search Files', 'description': "Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '.ext' to match files in current directory, and '**/.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'pattern': {'type': 'string'}, 'excludePatterns': {'default': [], 'type': 'array', 'items': {'type': 'string'}}}, 'required': ['path', 'pattern']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_get_file_info', 'title': 'Get File Info', 'description': 'Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_list_allowed_directories', 'title': 'List Allowed Directories', 'description': 'Returns the list of directories that this server is allowed to access. Subdirectories within these allowed directories are also accessible. Use this to understand which directories and their nested paths are available before trying to access files.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {}}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}]}
🤖 Using OpenAIAugmentedLLM (user preference: openai)
✅ LLM attached successfully
🔄 Making LLM request with params: maxTokens=8192, temperature=0.2
[03/17/26 11:58:10] INFO HTTP Request: POST http://192.168.7.241:28000/chat/completions "HTTP/1.1 200 OK" _client.py:1740
✅ Planning request completed
Raw result type: <class 'str'>
Raw result length: 2678
🎯 Chat planning completed successfully
Planning result preview: ```yaml
project_plan:
title: "测试成功程序"
description: "一个简单的测试程序,用于验证基本运行环境并显示'测试成功'消息"
project_type: "tool"
CUSTOM FILE TREE STRUCTURE
file_structure: |
test_success/
├── main.py # 程序入口点
├── config.py # 配置文件
├── requirements.txt # Python依赖
├── README.md # 项目文档
├── tests/
│ ├── init.py
│ └── test_main.py # 测试文件
└── .gitignore # Git忽略规则
CORE IMPLEMENTATION PLAN
imple...
💾 Created chat project workspace: /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890
📄 Saved requirements to: /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890/chat_project_1773719890.md
🏗️ Intelligent workspace infrastructure synthesized:
Base workspace environment: /home/openclaw/桌面/DeepCode/deepcode_lab
Research workspace: /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890
AI-driven path optimization: active
[Broadcast] task=c125b670... type=progress subscribers=2
[WorkflowWS] Sending: task=c125b670... type=progress
💾 Implementation plan saved to /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890/initial_plan.txt
Launching intelligent code synthesis with AI-driven implementation strategies...
[Broadcast] task=c125b670... type=progress subscribers=2
[Broadcast] task=c125b670... type=progress subscribers=2
[Broadcast] task=c125b670... type=progress subscribers=2
[WorkflowWS] Sending: task=c125b670... type=progress
[WorkflowWS] Sending: task=c125b670... type=progress
[WorkflowWS] Sending: task=c125b670... type=progress
⚡ Using standard code implementation workflow (fast mode)...
Error during code implementation workflow: name 'LoopDetector' is not defined
[Broadcast] task=c125b670... type=complete subscribers=2
[WorkflowWS] Sending: task=c125b670... type=complete
[WorkflowWS] Workflow finished: task=c125b670... type=complete
[CodeStreamWS] Workflow finished: task=c125b670... type=complete
INFO: connection closed
INFO: connection closed
[Unsubscribe] task=c125b670... remaining=1
[Unsubscribe] task=c125b670... remaining=0
[INFO] 2026-03-17T11:58:24 mcp_agent.chat_planning - MCPApp cleanup
{
"data": {
"progress_action": "Finished",
"target": "chat_planning",
"agent_name": "mcp_application_loop"
}
}
Error writing to log file logs/mcp-agent-20260317_115523.jsonl: [Errno 2] No such file or directory: 'logs/mcp-agent-20260317_115523.jsonl'
[03/17/26 11:58:24] INFO [mcp_agent.chat_planning] MCPApp cleanup listeners.py:108
Additional Information
- DeepCode Version: Latest version
- Operating System: ubuntu 24
- Python Version: 3.11
- Related Issues:
Do you need to file an issue?
Describe the bug
Using the latest version of DeepCode, the agent successfully generates the implementation plan but fails to produce any actual code files. The workflow seems to terminate prematurely due to a Python NameError.
Steps to reproduce
1 Clone the repository: git clone https://github.com/HKUDS/DeepCode.git
2 Create and activate a conda environment with Python 3.11.
3 Install dependencies: pip install deepcode-hku
4 Configure the settings and start the service via ./run.sh (The same issue occurs in the Docker environment).
5 Input a test prompt: "Write a test program that displays 'Test Successful'."
The agent generates the initial_plan.txt successfully. However, the code implementation phase fails, and no source code files are found in the workspace.
Log analysis shows the following error:
Error during code implementation workflow: name 'LoopDetector' is not defined
It appears that LoopDetector is either not imported or not defined in the code implementation module, causing the workflow to crash.
Expected Behavior
The agent should proceed from the planning stage to code synthesis and save the generated source code to the workspace.
DeepCode Config Used
Default config
Logs and screenshots
./run.sh
🚀 启动 DeepCode New UI...
✓ 使用 conda 环境: deepcode
📍 Python: /home/openclaw/anaconda3/envs/deepcode/bin/python
[1/2] 启动后端服务...
INFO: Will watch for changes in these directories: ['/home/openclaw/桌面/DeepCode/new_ui/backend']
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: Started reloader process [7370] using StatReload
INFO: Started server process [7373]
INFO: Waiting for application startup.
Starting DeepCode New UI Backend...
Project root: /home/openclaw/桌面/DeepCode
Backend dir: /home/openclaw/桌面/DeepCode/new_ui/backend
Mode: Development
INFO: Application startup complete.
✓ 后端已启动: http://localhost:8000
[2/2] 启动前端服务...
VITE v5.4.21 ready in 129 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
╔════════════════════════════════════════╗
║ DeepCode New UI 已启动! ║
╠════════════════════════════════════════╣
║ ║
║ 🌐 前端: http://localhost:5173 ║
║ 🔧 后端: http://localhost:8000 ║
║ 📚 API: http://localhost:8000/docs ║
║ ║
║ 按 Ctrl+C 停止所有服务 ║
╚════════════════════════════════════════╝
INFO: 127.0.0.1:40172 - "POST /api/v1/workflows/chat-planning HTTP/1.1" 200 OK
[03/17/26 11:55:23] INFO Registered plugin 'requirement_analysis' at before_planning base.py:231
INFO Registered plugin 'plan_review' at after_planning base.py:231
[WorkflowService] Plugin integration initialized
INFO Running hook before_planning with 1 plugin(s) base.py:299
INFO Running plugin 'requirement_analysis' base.py:314
[INFO] 2026-03-17T11:55:23 mcp_agent.core.context - Configuring logger with level: info
[INFO] 2026-03-17T11:55:23 mcp_agent.chat_planning - Loading subagents from configuration...
[INFO] 2026-03-17T11:55:23 mcp_agent.chat_planning - MCPApp initialized
{
"data": {
"progress_action": "Running",
"target": "chat_planning",
"agent_name": "mcp_application_loop",
"session_id": "fa01537b-ce6b-465d-99a5-f06b4d58b0d6"
}
}
🤖 Using OpenAIAugmentedLLM (user preference: openai)
[03/17/26 11:55:24] INFO RequirementAnalysisAgent initialized successfully requirement_analysis_agent.py:90
INFO Starting to generate AI precise guiding questions requirement_analysis_agent.py:115
INFO Calling LLM to generate precise questions, input length: 18 requirement_analysis_agent.py:143
INFO: 127.0.0.1:40176 - "WebSocket /ws/workflow/c125b670-1e96-4c18-b629-2071028e36fa" [accepted]
[WorkflowWS] Connected: task=c125b670...
[Subscribe] Success: task=c125b670... total_subscribers=1
[WorkflowWS] Subscribed: task=c125b670... queue=True task=True
INFO: connection open
INFO [mcp_agent.core.context] Configuring logger with level: info listeners.py:108
INFO: 127.0.0.1:45534 - "WebSocket /ws/code-stream/c125b670-1e96-4c18-b629-2071028e36fa" [accepted]
[Subscribe] Success: task=c125b670... total_subscribers=2
INFO: connection open
INFO [mcp_agent.chat_planning] Loading subagents from configuration... listeners.py:108
INFO [mcp_agent.chat_planning] MCPApp initialized listeners.py:108
[03/17/26 11:56:43] INFO HTTP Request: POST http://192.168.7.241:28000/chat/completions "HTTP/1.1 200 OK" _client.py:1740
INFO LLM returned result length: 589 requirement_analysis_agent.py:149
INFO LLM returned result: [ requirement_analysis_agent.py:157
{
"category": "Technology Selection",
"question": "程序需要在什么具体环境下运行(如命令行终端、Web 页面、桌面 GUI、移动端),首选编程语言是什么?",
"importance": "High",
"hint": "运行环境决定了代码框架、依赖库及打包方式的选择"
},
{
"category": "Functional Requirements",
"question": "'测试成功' 信息具体通过何种方式呈现(如控制台标准输出、图形界面弹窗、HTTP 响应体、或写入日志文件)?",
"importance": "High",
"hint": "明确输出形式决定了 I/O 操作、UI 组件或网络协议的使用"
},
{
"category": "Deployment Environment",
"question": "该程序是否需要集成到自动化流程中(如 CI/CD),执行成功后是否需要返回特定的退出码(Exit Code)...
INFO Extracted JSON: [ requirement_analysis_agent.py:170
{
"category": "Technology Selection",
"question": "程序需要在什么具体环境下运行(如命令行终端、Web 页面、桌面 GUI、移动端),首选编程语言是什么?",
"importance": "High",
"hint": "运行环境决定了代码框架、依赖库及打包方式的选择"
},
{
"categ...
INFO ✅ Successfully generated 3 AI precise guiding questions requirement_analysis_agent.py:179
[Broadcast] task=c125b670... type=interaction_required subscribers=2
[WorkflowWS] Sending: task=c125b670... type=interaction_required
INFO: 127.0.0.1:35058 - "POST /api/v1/workflows/respond/c125b670-1e96-4c18-b629-2071028e36fa HTTP/1.1" 200 OK
[WorkflowService] Requirements after plugin: 18 chars
🚀 Initializing chat-based planning and implementation pipeline
💬 Chat mode: Direct user requirements to code implementation
📁 Working environment: local
📂 Workspace directory: /home/openclaw/桌面/DeepCode/deepcode_lab
✅ Workspace status: ready
🧠 Running chat-based planning agent...
💬 Starting chat-based planning agent...
Input length: 18
Input preview: 编写一个测试程序,显示:“测试成功”...
🔍 Using search server: filesystem
[Broadcast] task=c125b670... type=progress subscribers=2
[Broadcast] task=c125b670... type=progress subscribers=2
[WorkflowWS] Sending: task=c125b670... type=progress
[INFO] 2026-03-17T11:57:34 mcp_agent.mcp.mcp_connection_manager - filesystem: Up and running with a persistent connection!
[WorkflowWS] Sending: task=c125b670... type=progress
[03/17/26 11:57:34] INFO [mcp_agent.mcp.mcp_connection_manager] filesystem: Up and running with a persistent connection! listeners.py:108
Secure MCP Filesystem Server running on stdio
No valid root directories provided by client
chat_planning: Connected to server, calling list_tools...
Tools available: {'meta': None, 'nextCursor': None, 'tools': [{'name': 'filesystem_read_file', 'title': 'Read File (Deprecated)', 'description': 'Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'tail': {'description': 'If provided, returns only the last N lines of the file', 'type': 'number'}, 'head': {'description': 'If provided, returns only the first N lines of the file', 'type': 'number'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_read_text_file', 'title': 'Read Text File', 'description': "Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Operates on the file as text regardless of extension. Only works within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'tail': {'description': 'If provided, returns only the last N lines of the file', 'type': 'number'}, 'head': {'description': 'If provided, returns only the first N lines of the file', 'type': 'number'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_read_media_file', 'title': 'Read Media File', 'description': 'Read an image or audio file. Returns the base64 encoded data and MIME type. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'array', 'items': {'type': 'object', 'properties': {'type': {'type': 'string', 'enum': ['image', 'audio', 'blob']}, 'data': {'type': 'string'}, 'mimeType': {'type': 'string'}}, 'required': ['type', 'data', 'mimeType'], 'additionalProperties': False}}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_read_multiple_files', 'title': 'Read Multiple Files', 'description': "Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'paths': {'minItems': 1, 'type': 'array', 'items': {'type': 'string'}, 'description': 'Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories.'}}, 'required': ['paths']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_write_file', 'title': 'Write File', 'description': 'Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'content': {'type': 'string'}}, 'required': ['path', 'content']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': True, 'idempotentHint': True, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_edit_file', 'title': 'Edit File', 'description': 'Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'edits': {'type': 'array', 'items': {'type': 'object', 'properties': {'oldText': {'type': 'string', 'description': 'Text to search for - must match exactly'}, 'newText': {'type': 'string', 'description': 'Text to replace with'}}, 'required': ['oldText', 'newText']}}, 'dryRun': {'default': False, 'description': 'Preview changes using git-style diff format', 'type': 'boolean'}}, 'required': ['path', 'edits']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': True, 'idempotentHint': False, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_create_directory', 'title': 'Create Directory', 'description': 'Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': False, 'idempotentHint': True, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_list_directory', 'title': 'List Directory', 'description': 'Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_list_directory_with_sizes', 'title': 'List Directory with Sizes', 'description': 'Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'sortBy': {'default': 'name', 'description': 'Sort entries by name or size', 'type': 'string', 'enum': ['name', 'size']}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_directory_tree', 'title': 'Directory Tree', 'description': "Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'excludePatterns': {'default': [], 'type': 'array', 'items': {'type': 'string'}}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_move_file', 'title': 'Move File', 'description': 'Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'source': {'type': 'string'}, 'destination': {'type': 'string'}}, 'required': ['source', 'destination']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': False, 'destructiveHint': False, 'idempotentHint': False, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_search_files', 'title': 'Search Files', 'description': "Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '.ext' to match files in current directory, and '**/.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.", 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}, 'pattern': {'type': 'string'}, 'excludePatterns': {'default': [], 'type': 'array', 'items': {'type': 'string'}}}, 'required': ['path', 'pattern']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_get_file_info', 'title': 'Get File Info', 'description': 'Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'path': {'type': 'string'}}, 'required': ['path']}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}, {'name': 'filesystem_list_allowed_directories', 'title': 'List Allowed Directories', 'description': 'Returns the list of directories that this server is allowed to access. Subdirectories within these allowed directories are also accessible. Use this to understand which directories and their nested paths are available before trying to access files.', 'inputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {}}, 'outputSchema': {'$schema': 'http://json-schema.org/draft-07/schema#', 'type': 'object', 'properties': {'content': {'type': 'string'}}, 'required': ['content'], 'additionalProperties': False}, 'icons': None, 'annotations': {'title': None, 'readOnlyHint': True, 'destructiveHint': None, 'idempotentHint': None, 'openWorldHint': None}, 'meta': None, 'execution': {'taskSupport': 'forbidden'}}]}
🤖 Using OpenAIAugmentedLLM (user preference: openai)
✅ LLM attached successfully
🔄 Making LLM request with params: maxTokens=8192, temperature=0.2
[03/17/26 11:58:10] INFO HTTP Request: POST http://192.168.7.241:28000/chat/completions "HTTP/1.1 200 OK" _client.py:1740
✅ Planning request completed
Raw result type: <class 'str'>
Raw result length: 2678
🎯 Chat planning completed successfully
Planning result preview: ```yaml
project_plan:
title: "测试成功程序"
description: "一个简单的测试程序,用于验证基本运行环境并显示'测试成功'消息"
project_type: "tool"
CUSTOM FILE TREE STRUCTURE
file_structure: |
test_success/
├── main.py # 程序入口点
├── config.py # 配置文件
├── requirements.txt # Python依赖
├── README.md # 项目文档
├── tests/
│ ├── init.py
│ └── test_main.py # 测试文件
└── .gitignore # Git忽略规则
CORE IMPLEMENTATION PLAN
imple...
💾 Created chat project workspace: /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890
📄 Saved requirements to: /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890/chat_project_1773719890.md
🏗️ Intelligent workspace infrastructure synthesized:
Base workspace environment: /home/openclaw/桌面/DeepCode/deepcode_lab
Research workspace: /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890
AI-driven path optimization: active
[Broadcast] task=c125b670... type=progress subscribers=2
[WorkflowWS] Sending: task=c125b670... type=progress
💾 Implementation plan saved to /home/openclaw/桌面/DeepCode/deepcode_lab/papers/chat_project_1773719890/initial_plan.txt
Launching intelligent code synthesis with AI-driven implementation strategies...
[Broadcast] task=c125b670... type=progress subscribers=2
[Broadcast] task=c125b670... type=progress subscribers=2
[Broadcast] task=c125b670... type=progress subscribers=2
[WorkflowWS] Sending: task=c125b670... type=progress
[WorkflowWS] Sending: task=c125b670... type=progress
[WorkflowWS] Sending: task=c125b670... type=progress
⚡ Using standard code implementation workflow (fast mode)...
Error during code implementation workflow: name 'LoopDetector' is not defined
[Broadcast] task=c125b670... type=complete subscribers=2
[WorkflowWS] Sending: task=c125b670... type=complete
[WorkflowWS] Workflow finished: task=c125b670... type=complete
[CodeStreamWS] Workflow finished: task=c125b670... type=complete
INFO: connection closed
INFO: connection closed
[Unsubscribe] task=c125b670... remaining=1
[Unsubscribe] task=c125b670... remaining=0
[INFO] 2026-03-17T11:58:24 mcp_agent.chat_planning - MCPApp cleanup
{
"data": {
"progress_action": "Finished",
"target": "chat_planning",
"agent_name": "mcp_application_loop"
}
}
Error writing to log file logs/mcp-agent-20260317_115523.jsonl: [Errno 2] No such file or directory: 'logs/mcp-agent-20260317_115523.jsonl'
[03/17/26 11:58:24] INFO [mcp_agent.chat_planning] MCPApp cleanup listeners.py:108
Additional Information