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

Ouverte
#1,078 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
ai-infra-agents, cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Aucune donnée de langage
Étoiles
4.2k
Forks
377
Merge moyen
1 j 17 min
PR mergées (30 j)
7

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CommandCodeAI/command-code

Toutes les issues de CommandCodeAI/command-code

Issues similaires

Plus d'issues AI Infra & Agents

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.