Commit ccd59d7
MSCodeBase Agent
fix(sandbox): binary mode subprocess to fix Windows pipe deadlock (§5.16)
- Remove text=True, encoding='utf-8' from Popen — causes pipe buffer
deadlock when MCP server redirects stdout for JSON-RPC
- Decode stdout/stderr manually with .decode('utf-8', errors='replace')
- Pattern matches §5.16: Popen(PIPE) + communicate(timeout) + binary
- Sandbox tests: 34/34 passed. execute_script in MCP runtime: needs
server restart to pick up this change.1 parent 58dd4af commit ccd59d7
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
346 | | - | |
347 | | - | |
348 | 347 | | |
349 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
357 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
| |||
0 commit comments