Repository navigation
Replies: 2 comments
|
Follow-up with a local reproduction — the mechanism is now confirmed. Root cause: Reproduction (node-pty +
A raw non-blocking Shell-agnostic: identical failure with Secondary effect: after a timeout the interactive shell keeps waiting inside the unterminated heredoc — later commands are swallowed as heredoc body, which is why even a ~1.7 KB retry also hung. The timeout path should reset the shell (interrupt + drain pending input) so subsequent calls recover. Fix direction: chunk PTY input with drain/backpressure, enforce a max command size with a clear error, or route non-interactive commands through an argv-based |
|
The shell never sees a heredoc. That changes the mechanism.
The write path is exactly as you traced, one layer lower: Two parts of the report do not hold on the current code.
So the useful half of your suggestion is the input side — chunk inside |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On the desktop app (dsh 0.2.1-rc.3, macOS arm64),
bashtool calls that carry a large multi-line command — e.g. a ~17 KBcat > file << 'EOF' … EOFheredoc or a ~15 KBpython3 -cscript — never execute. The call hangs until the 300 s timeout and is killed, and the persistent shell can be left in a continuation state that hangs subsequent commands as well. Small single-line commands work fine.Observed live: an agent tried
mkdir→cat > file << EOF→cat|head→ls→python3 -c→ chunked heredoc. Only the small commands ran; every file-writing attempt timed out and the file was never created.Session journal evidence
Workspace
/Volumes/2t/code/polly-subtitle-translator, presetworkspace-write:mkdir -p "<ws>/鹈鹕"cat > "<ws>/鹈鹕/qwen3.6.moe.html" << 'HTMLEOF'(+ ~16.9 KB HTML)dsh>prompt; file not createdcat "<ws>/鹈鹕/qwen3.6.moe.html" | head -20No such file or directoryls -la "<ws>/鹈鹕/"python3 -c "html_content = '''<same html>''' …"cat > qwen3.6.moe.html << 'PART1'The recorded
argumentsfor seq 48 are complete and well-formed — the JSON-encoded command ends with theHTMLEOFterminator. So the model emitted a valid command; the tail of the input appears to be lost somewhere between the tool call and the shell's parser.Suspected cause
bashis backed by a persistent interactive PTY shell (/bin/bash --noprofile --norc -i, controlled promptdsh>). Sending a large multi-line command through the tty apparently drops trailing bytes, so the heredoc/quote terminator never arrives: the shell keeps waiting for input, the command never runs (the>redirection only executes after the heredoc is fully parsed — consistent with the file never being created), and the executor waits for the nextdsh>prompt until the 300 s timeout.Suggestions
sh -c), or chunk the input with backpressure instead of one large write.write/edittools for file creation instead of bash heredocs.Environment
workspace-write; all writes here target paths inside the workspace, so the file sandbox is not the causenoowners(likely unrelated)session.v4.jsonl.zstd) if usefulAll reactions