llvm / llvm/llvm-project

`lldb-mcp` will hang on interactive commands

Open
#169,703 0 comments 0 reactions 0 assignees View on GitHub
lldb-mcp
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

# The Issue

When a command like `breakpoint delete` is sent via MCP to `lldb`, the `lldb` session will get an interactive prompt that the user needs to confirm.

For example:
```
lldb) breakpoint delete
About to delete all breakpoints, do you want to do that?: [Y/n]
```

The problem is that the MCP server is not made aware that it needs to wait, and thus, if the user is not actively monitoring the `lldb` terminal, they will not realize that the command is hanging because it is waiting for acknowledgement, resulting in timeouts.

For example in Codex:

```
• Called lldb-mcp.lldb_command({"debugger_id":1,"arguments":"br delete"})
└ Error: tool call error: tool call failed for `lldb-mcp/lldb_command`
Caused by:
0: timed out awaiting tools/call after 60s
1: deadline has elapsed
```

# Proposed Solution

I think the easiest would be to have something like `About to delete all breakpoints, do you want to do that?: [Y/n]` be the response that is sent over MCP, so that the LLM recognizes it is being asked a question. It can then send `Y` or `n` back as a response (after consulting users)

Since some users might not _want_ an interactive command to be exposed over MCP, it might make sense to add some type of flag to enable/disable this command.

Happy to try to take a look at this myself is the maintainers consider it a real issue!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.