Gateway 400: request exceeds JSON node limit (32768), long session cannot recover via compaction

未關閉
#1,078 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
ai-infra-agents, cli

研究方向

Start by tracing how the CLI builds and sends long-session requests, then inspect the gateway handling of the 32,768-node JSON limit. The issue names no files or tests, so first locate the request construction and error handling entry points. Done means a long session can recover from this structural limit, or the error reports the current node count and limit.

由索引模型根據 Issue 內容生成。

描述

Summary

Using Command Code (GOAT plan), a long session started failing on every request with a gateway 400:

Command Code API error 400: the request exceeds the gateway's JSON node limit (node count cannot exceed 32768)

The error text says the cap is on the request's structure, not its token length, so compacting the session usually will not bring it under the limit. The suggested remedies are starting a new session, or reducing the messages and images in the current one.

Why this looks distinct

  • This is a structural (JSON node count) limit, not a token / context-window limit.
  • Compaction does not reliably recover the session, because compacting does not necessarily reduce the node count below the cap.
  • I searched existing issues and did not find this exact error string. The closest related report is #1003 (compaction summaries compound instead of replacing, sessions 400 to death), but that issue's 400s are context/token-driven, whereas this one is node-count-driven.

Impact

Long sessions become unusable: a new session loses context, and trimming messages and images is not a sustainable fix.

Suggestions

  • Raise the gateway JSON node limit, or
  • Structurally compact or merge nodes for long-session requests, on the gateway or client side, before forwarding, or
  • At least include the current node count versus the limit in the error message, so users can tell how far over they are.

Notes

主要語言
沒有語言資料
星號
4.2k
分支
377
平均合併
1 天 17 分鐘
30 天內合併 PR
7

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CommandCodeAI/command-code 的其他 Issue

查看 CommandCodeAI/command-code 的全部 Issue

相似的 Issue

更多 AI Infra & Agents Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。