Skip to content

unify context overflow recovery - #240

Merged
deathbyknowledge merged 1 commit into
mainfrom
fix/context-overflow-compaction
Aug 12, 2026
Merged

unify context overflow recovery#240
deathbyknowledge merged 1 commit into
mainfrom
fix/context-overflow-compaction

Conversation

@deathbyknowledge

Copy link
Copy Markdown
Owner

Summary

  • route provider-confirmed context overflows through the same Process-owned history policy used by preflight
  • auto-compact and retry the same active model once instead of entering the main generation fallback chain
  • document fail, no-prefix, and repeated-overflow behavior and cover the observed Workers AI/Kimi response

Validation

  • cd gateway && npx tsc --noEmit
  • focused Process overflow tests: 8 passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84447ade8c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread gateway/src/process/do.ts
if (!result.ok) {
const message = `Auto-compaction failed before model call: ${result.error}`;
const message = trigger === "provider-overflow"
? `Auto-compaction failed after provider context overflow: ${result.error}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Highlight overflow compaction failures in chat

When auto-compaction fails after a provider-confirmed overflow, this emits a new system-message prefix, but the chat UI only recognizes Auto-compaction failed before model call: in web/src/app/features/chat/domain/transcript.ts:322-327. In that summary-generation/archive-failure path, the run finishes with status: "error" while both the live proc.changed row and refreshed history render as a neutral system message, hiding the failure from users; please update the web consumer alongside the new gateway format.

AGENTS.md reference: AGENTS.md:L165-L165

Useful? React with 👍 / 👎.

@deathbyknowledge
deathbyknowledge merged commit 1b8558c into main Aug 12, 2026
13 of 14 checks passed
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.

1 participant