unexpected EOF 与 attempt 1/9 重试死循环原因、一键修复提示词和验证方法,照着做 2 分钟搞定。
一句话:服务端要把写文件的工具参数一次性生成完才下发,期间链路静默 65~80 秒,超过反向代理 60 秒空闲超时就被掐断,重试时同样超时,于是一直循环。
write_to_file / replace_file_content 的 JSON 参数要全部生成完才下发,链路完全静默。daily-cloudcode-pa 反代 60 秒静默就断开,报 unexpected EOF,然后反复重试。让它自己改本地配置:加一条全局规则,限制每次写文件的行数;再禁用强制整文件输出的技能。
请帮我完成以下两项本地配置修改,用来规避服务端 60 秒静默断流(unexpected EOF)问题: 1. 找到我的全局规则文件(通常是 ~/.gemini/GEMINI.md,如果不存在请直接新建),在文件末尾追加以下最高优先级规则,不要覆盖我原有的内容: # Tool Call Size Limit (Prevent 60s SSE Timeout) - STRICTLY limit every single file-editing tool call (`write_to_file`, `replace_file_content`, `multi_replace_file_content`) to at most 60–80 lines of code. - NEVER generate or overwrite a large file (>100 lines) in a single tool call. - For large files or refactors, write the minimal skeleton first, then apply incremental chunked edits across multiple sequential tool calls. - Output a brief 1-line status update between tool calls to keep the SSE stream active. - This rule overrides any other skill or instruction that enforces full-file output in a single call. 2. 帮我检查本地技能目录中名为 `full-output-enforcement` 的技能文件。如果能直接重命名(比如改成 `.disabled`)或移出加载目录来禁用它,请直接处理;如果属于只读或受保护路径,请告诉我具体路径,我手动删。 完成后请把修改后的文件路径和结果发给我。
新开一个对话,问它一句:
我现在的全局规则里,单次改文件最多允许多少行?