Repository navigation
fix: resynchronize current session metadata on ACP v2 resume - #717
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_meta: null, then restore the agent's currently known metadata when nonempty. Serialize both frames with live session-info updates so an older restoration cannot overwrite a newer patch.SessionState, so the metadata lifetime must not follow that object's identity. Seed known native thread status before releasing new live events. Close/reopen starts a fresh metadata lifetime.params._metathrough the shared v2 conversion path, but do not store or replay it as entity metadata. Keep v1 wire behavior unchanged.Checked against ACP
a965f1f1:docs/protocol/v2/extensibility.mdx:103-150defines metadata replacement/removal and explicit resynchronization clears.docs/protocol/v2/session-setup.mdx:355-358recommends current session info after replay and before the response, including omitted/nullreplayFrom.Scope
This synchronizes currently known
session_info_updatemetadata. It does not invent a deep merge for extension namespaces, copy raw session-list snapshot metadata into entity patches, or reconstruct every metadata field from persistent storage. Writers sharing a top-level namespace still need to compose complete values; that cleanup is separate, with the new serialized domain-patch API available for it. Newer upstream auth/proxy/background schema additions are not adopted here. No review/checklist Markdown file is included.Validation
npm run typechecknpm run buildnpm test: 2,358 passed, 39 skippednpm run test:integration: all 19 passednpm run codex-test -- -p "Reply with exactly OK. Do not use tools or modify any files." -o summary: completed withend_turngit diff --checkCoverage includes shallow replacement and removals, nested null values, clearing keys the agent has never seen, JSON copies, notification-only metadata, serialization under backpressure, queued patches, disposal during restoration, write-failure recovery, failure revision matching, active resumes with/without replay, close/reopen, current failure continuity, and post-close publication fencing. The real-Codex foreground-state integration covers all replay settings with the extended info synchronization sequence.