Skip to content

[Bug]: Just stops on one error during code implementation stage. #39

@okeanosthedev

Description

@okeanosthedev

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • I believe this is a legitimate bug, not just a question or feature request.

Describe the bug

I cloned the git repo and started using it with web interface. Several times I have tried using it with diffrent models but along the way everytime I got this following json output error and deepcode stopped without finishing its job.
Error: {
"analysis_result":"Integrated into complete workflow"
"download_result":"Integrated into complete workflow"
"repo_result":"Chat-based planning and implementation pipeline completed for /Users/okyozcan/Downloads/deepcode/DeepCode/deepcode_lab/papers/chat_project_1757004202
❌ Code implementation failed: Unterminated string starting at: line 1 column 25 (char 24)"
"status":"success"
}

Steps to reproduce

Download the source using git clone.
Setup project.
Run using "uv"
Use web interface with openrouter endpoint and key.

Expected Behavior

Finishing the workflow with no errors.

DeepCode Config Used

$schema: ./schema/mcp-agent.config.schema.json

Default search server configuration

Options: "brave" or "bocha-mcp"

default_search_server: "brave"

Planning mode configuration

Options: "segmented" or "traditional"

segmented: Breaks down large tasks to avoid token truncation (recommended)

traditional: Uses parallel agents but may hit token limits

planning_mode: "segmented"

Document segmentation configuration

document_segmentation:
enabled: true # Whether to use intelligent document segmentation
size_threshold_chars: 50000 # Document size threshold (in characters) to trigger segmentation

If document size > threshold and enabled=true, use segmentation workflow

If document size <= threshold or enabled=false, use traditional full-document reading

execution_engine: asyncio
logger:
transports: [console, file]
level: info
progress_display: true
path_settings:
path_pattern: "logs/mcp-agent-{unique_id}.jsonl"
unique_id: "timestamp" # Options: "timestamp" or "session_id"
timestamp_format: "%Y%m%d_%H%M%S"

mcp:
servers:
brave:
# On windows replace the command and args line to use node and the absolute path to the server.
# Use npm i -g @modelcontextprotocol/server-brave-search to install the server globally.
# Use npm -g root to find the global node_modules path.# command: "node" # args: ["c:/Program Files/nodejs/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"] command: "npx" args: ["-y", "@modelcontextprotocol/server-brave-search"] env: # You can also place your BRAVE_API_KEY in the fastagent.secrets.yaml file. BRAVE_API_KEY: "" filesystem: # On windows update the command and arguments to usenodeand the absolute path to the server. # Usenpm i -g @modelcontextprotocol/server-filesystemto install the server globally. # Usenpm -g root to find the global node_modules path.
# command: "node"
# args: ["c:/Program Files/nodejs/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js","."]
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem"]
fetch:
command: "uvx"
args: ["mcp-server-fetch"]
github-downloader:
command: "python"
args: ["tools/git_command.py"]
env:
PYTHONPATH: "."
file-downloader:
command: "python"
args: ["tools/pdf_downloader.py"]
env:
PYTHONPATH: "."
command-executor:
command: "python"
args: ["tools/command_executor.py"]
env:
PYTHONPATH: "."
code-implementation:
command: "python"
args: ["tools/code_implementation_server.py"]
env:
PYTHONPATH: "."
description: "Paper code reproduction tool server - provides file operations, code execution, search and other functions"
code-reference-indexer:
command: "python"
args: ["tools/code_reference_indexer.py"]
env:
PYTHONPATH: "."
description: "Code reference indexer server - Provides intelligent code reference search from indexed repositories"
bocha-mcp:
command: "python3"
args: ["tools/bocha_search_server.py"]
env:
PYTHONPATH: "."
BOCHA_API_KEY: ""
document-segmentation:
command: "python"
args: ["tools/document_segmentation_server.py"]
env:
PYTHONPATH: "."
description: "Document segmentation server - Provides intelligent document analysis and segmented reading to optimize token usage"

openai:

Secrets (API keys, etc.) are stored in an mcp_agent.secrets.yaml file which can be gitignored

default_model: "o3-mini"

default_model: "openai/gpt-5"

anthropic:

Logs and screenshots

{"level":"INFO","timestamp":"2025-09-04T19:42:28.206169","namespace":"mcp_agent.core.context","message":"Configuring logger with level: info"}
{"level":"INFO","timestamp":"2025-09-04T19:42:28.208857","namespace":"mcp_agent.paper_to_code","message":"Loading subagents from configuration..."}
{"level":"INFO","timestamp":"2025-09-04T19:42:28.209509","namespace":"mcp_agent.paper_to_code","message":"MCPApp initialized","data":{"data":{"progress_action":"Running","target":"paper_to_code","agent_name":"mcp_application_loop","session_id":"c1082376-75e8-4a16-9793-cfd3793e1bd3"}}}
{"level":"INFO","timestamp":"2025-09-04T19:42:29.153164","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"brave: Up and running with a persistent connection!"}
{"level":"INFO","timestamp":"2025-09-04T19:43:21.637288","namespace":"mcp_agent.mcp.mcp_aggregator.ChatPlanningAgent","message":"Last aggregator closing, shutting down all persistent connections..."}
{"level":"INFO","timestamp":"2025-09-04T19:43:21.637401","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"Disconnecting all persistent server connections..."}
{"level":"INFO","timestamp":"2025-09-04T19:43:21.637873","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"brave: Requesting shutdown..."}
{"level":"INFO","timestamp":"2025-09-04T19:43:21.842278","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"All persistent server connections signaled to disconnect."}
{"level":"INFO","timestamp":"2025-09-04T19:43:21.842583","namespace":"mcp_agent.mcp.mcp_aggregator.ChatPlanningAgent","message":"Connection manager successfully closed and removed from context"}
{"level":"INFO","timestamp":"2025-09-04T19:43:36.134809","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"command-executor: Up and running with a persistent connection!"}
{"level":"INFO","timestamp":"2025-09-04T19:43:57.529164","namespace":"mcp_agent.mcp.mcp_aggregator.StructureGeneratorAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"execute_commands","server_name":"command-executor","agent_name":"StructureGeneratorAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:44:07.615317","namespace":"mcp_agent.mcp.mcp_aggregator.StructureGeneratorAgent","message":"Last aggregator closing, shutting down all persistent connections..."}
{"level":"INFO","timestamp":"2025-09-04T19:44:07.615449","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"Disconnecting all persistent server connections..."}
{"level":"INFO","timestamp":"2025-09-04T19:44:07.616260","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"command-executor: Requesting shutdown..."}
{"level":"INFO","timestamp":"2025-09-04T19:44:07.817481","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"All persistent server connections signaled to disconnect."}
{"level":"INFO","timestamp":"2025-09-04T19:44:07.817642","namespace":"mcp_agent.mcp.mcp_aggregator.StructureGeneratorAgent","message":"Connection manager successfully closed and removed from context"}
{"level":"INFO","timestamp":"2025-09-04T19:44:10.490545","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"code-implementation: Up and running with a persistent connection!"}
{"level":"INFO","timestamp":"2025-09-04T19:44:10.490990","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"code-reference-indexer: Up and running with a persistent connection!"}
{"level":"INFO","timestamp":"2025-09-04T19:44:10.912116","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"set_workspace","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:44:30.700205","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"execute_bash","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:44:38.590750","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"execute_bash","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:44:58.178345","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_multiple_files","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:45:48.234809","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"write_multiple_files","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:47:15.518480","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"write_multiple_files","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:47:26.674426","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"execute_python","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:47:35.888615","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_code_mem","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:47:35.904134","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_file","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:48:07.377551","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"write_file","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:48:53.741360","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_code_mem","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:49:18.582942","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_code_mem","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:49:18.594808","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_file","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:51:18.266914","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"write_multiple_files","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:52:53.182209","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"write_file","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:53:34.812953","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_code_mem","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:55:13.831277","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"write_file","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:55:36.569706","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_code_mem","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:55:56.854185","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_code_mem","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:55:56.871152","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Requesting tool call","data":{"data":{"progress_action":"Calling Tool","tool_name":"read_file","server_name":"code-implementation","agent_name":"CodeImplementationAgent"}}}
{"level":"INFO","timestamp":"2025-09-04T19:58:15.794907","namespace":"mcp_agent.mcp.mcp_aggregator.CodeImplementationAgent","message":"Last aggregator closing, shutting down all persistent connections..."}
{"level":"INFO","timestamp":"2025-09-04T19:58:15.795018","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"Disconnecting all persistent server connections..."}
{"level":"INFO","timestamp":"2025-09-04T19:58:15.795428","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"code-implementation: Requesting shutdown..."}
{"level":"INFO","timestamp":"2025-09-04T19:58:15.795499","namespace":"mcp_agent.mcp.mcp_connection_manager","message":"code-reference-indexer: Requesting shutdown..."}

Additional Information

  • DeepCode Version: Latest github source
  • Operating System: MacOS
  • Python Version: 3.13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions