Skip to content

fix(cli): trim old run turns when context fills - #1506

Open
MAN$I VERMA 🦀 (mansiverma897993) wants to merge 2 commits into
qualcomm:mainfrom
mansiverma897993:fix/run-context-history-1498
Open

MAN$I VERMA 🦀 (mansiverma897993) wants to merge 2 commits into
qualcomm:mainfrom
mansiverma897993:fix/run-context-history-1498

Conversation

@mansiverma897993

@mansiverma897993 MAN$I VERMA 🦀 (mansiverma897993) commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep geniex run going when chat history exceeds context by dropping the oldest completed turns and retrying. Recognize negative SDK error codes in streaming responses so prompt overflow can trigger that retry.

Closes #1498

Test plan

  • go test ./cmd/geniex ./cmd/geniex/common ./server/handler -count=1 (WSL, local SDK)
  • Full runCompletions mock-server regression: stream overflow, old-turn eviction, and next-turn continuity
  • go test -race ./cmd/geniex -run TestRunCompletionsContinuesAfterContextOverflow -count=1
  • gofmt and git diff --check
  • Snapdragon device run (hardware unavailable locally)

Signed-off-by: Mansi Verma <vmansi756@gmail.com>
Signed-off-by: Mansi Verma <vmansi756@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: received error while streaming: SDKError(Input prompt too long)

1 participant