Skip to content

Accept surrounding conversation messages on agent API turns - #2184

Merged
asim merged 1 commit into
mainfrom
agent-context-messages
Nov 22, 2026
Merged

asim merged 1 commit into
mainfrom
agent-context-messages

Conversation

@asim

@asim asim commented Nov 22, 2026

Copy link
Copy Markdown
Member

Closes #2183.

Apps such as Malten can send ordered context.messages alongside prompt and an optional Mu thread. Each entry has required non-blank text and an optional author display label. Excerpts supplement existing history as quoted user-level background on first requests and follow-ups; they do not become saved conversation turns or workflow prompts, and no automatic memory extraction is introduced. Saved answers can reference the excerpts.

Reject more than 24 messages or 16,000 combined UTF-8 bytes of text/authors before execution. Existing authentication, thread ownership and tool permissions remain in place. Document the format, persistence, account scope and existing 32 KB body limit in the developer page and new /help/agent-api guide.

Validation: HTTP-to-mocked-provider tests cover first/follow-up turns, context disappearing when omitted, transcript persistence, invalid-input rejection, quoting/order and byte limits. go test ./agent ./internal/server ./docs -short, build, vet, formatting and diff checks pass. Full short suite passed all other packages after fixing the docs route; service/browser could not launch Chromium because the environment denies its socket/ptrace operations. Browser layout/screenshots were not run. No live model calls or deployment performed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T16:56:21.984439Z e9f9c7e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@asim
asim merged commit 2f88598 into main Nov 22, 2026
2 of 4 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.

Accept surrounding conversation messages on agent API turns

1 participant