Replies: 1 comment
|
这个问题在 SandBase Harness 里通过把“大输入”和进程 argv 解耦来处理:CLI 的 message 参数仍适合短文本,但长任务可以直接写入持久化 Session,而不是把完整上下文塞进子进程命令行。 可用入口:
参考:
这不能替代 DSH 的 --prompt-file / stdin 需求;如果仍保留 prompt 参数,建议在 spawn 前做平台相关长度预检并给出明确错误。对超长上下文,request-body/pipe + stable session id 还可以避免 shell history、进程列表和重试时的 argv 泄漏。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When the prompt is passed as a command-line argument, large contexts — exactly the headless/orchestration use case — run into the OS argv limit. On Windows the per-process command line is capped at ~32,767 characters (CreateProcess), so a prompt of that size makes the spawn fail outright, with no error pointing at argv length as the cause. We hit this in practice with an external process-level orchestrator that drives dsh headless runs, and fixed it on our side by writing the prompt to a file and passing a path instead. We suggest dsh itself provide file/stdin input channels plus a pre-spawn length guard with an actionable message.
Background & Evidence
Failure Mode or Reproduction
On POSIX the limit is larger but still finite, so the same class of failure exists there for very large prompts.
Proposed Fix
--prompt-file <path>: read the prompt from a UTF-8 file.--prompt -(or a--stdinflag) to read the prompt from standard input, pipe-friendly, no temp files needed.prompt exceeds the platform argv limit (~32K on Windows); use --prompt-file or pipe via stdin.Additional Context
@deepseek-ai/dsh0.1.1-rc.2 (developer preview)All reactions