Repository navigation
test(pi): isolate provider fixtures from host credentials - #604
Merged
Merged
Conversation
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 2, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_5f43dcb5c3dc15f0f18ace9ca5bc3132"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> Minor release: Claude and Codex accept prompt options on resume again, so a resumed session keeps its prompt after native compaction. The new optional `Runtime.resumedSessionOptions` says, before a session opens, when a prompt supplied on resume takes effect and what omitting it does. ## Behavior changes for hosts ### Prompts on resume (#606) - Claude now accepts `systemPrompt` and `appendSystemPrompt` on resume, and Codex accepts `appendSystemPrompt`. Since #469 these opens were refused with `UnsupportedOptionError`. OAR now forwards them to the native launch. - A value different from the one the session saved takes effect at the next native compaction; until then the saved prompt stays in effect. Omitting the option keeps the saved prompt only until that compaction; after it, the session gets what a new session without that option would get (the runtime's built-in prompt plus the user's own configuration). Empty and repeated values are now forwarded too, where they used to be refused. - **Pass the current prompts on every resume.** This holds for Claude and Codex as above, and also for Qwen and Pi (in-process and subprocess), which do not save prompts at all: there an omitted prompt is gone on the very next request. - Why the change: #469 observed only the first resumed request, where the new value was ignored, and advised hosts to omit these options to keep the saved prompt. At compaction Claude drops its saved prompts and Codex its saved append, so a session resumed that way silently lost its prompt at its next compaction. - Codex `systemPrompt` (replacement) is unchanged: it applies immediately on resume and keeps the saved value when omitted, including across compaction. - New optional `Runtime.resumedSessionOptions`, keyed by `SessionOptions` names. Each entry has `provided` (`immediate` or `next_compaction`, for a value different from the saved one) and `omitted` (`saved`, `default` or `saved_until_compaction`). It is declared for Claude, Codex, Qwen, Pi (in-process and subprocess) and Pi Durable, measured on Claude 2.1.316, Codex 0.166.0, Qwen 0.26.5 and Pi 1.4.0. An absent entry means untested; it implies neither support nor refusal, and refusals stay in `refusedSessionOptions` and conditional `UnsupportedOptionError`s (for example Pi Durable still refuses changed settings while adopting an active run). `ResumedSessionOptions` and `ResumeOptionSemantics` are exported from the package root. The Codex entries were measured with local compaction; compaction under a ChatGPT login was checked in Codex source only. - Grok: resuming with `appendSystemPrompt` but no `systemPrompt` is still `UnsupportedOptionError`, now with a migration hint, because Grok (1.0.70) never applies a changed append on resume, even after compaction. It is refused even when the text is unchanged, since OAR cannot compare it with the saved value. For an append-only Grok session, omit `appendSystemPrompt` on resume; the saved one stays in effect. To change it, supply `systemPrompt` as well. Match on `option`, not on the text. - OAR does not compare prompt text, insert a prompt into the first input, or compact on its own. ### Qwen memory extraction (#605: docs and a regression, no behavior change) - With Qwen 0.26.5 (observed on Linux with a scripted provider), each completed ordinary turn also makes a managed-memory extraction request after the main reply and before the native `result`. Its time and usage belong to that turn, and `promptAndWait` waits for it. Receiving all of the reply text does not mean the turn has ended: disposing before `turn_ended` interrupts the extraction like any active turn, so that turn has no native `result` or complete OAR usage, and a raw assistant frame may hold only the main request's partial usage. This is not a claim about every memory configuration or provider. ## Known issue - Qwen's native compaction report (`Context compressed (old -> new)`) is projected as model text (`text_delta`), and Qwen sessions emit no compaction events. Qwen 0.26.5's stream-json output marks it no differently from model text, and a user's own `compress.toml` can replace `/compress` with an ordinary model turn, so OAR cannot tell them apart and does not guess. Do not treat that line as the model's answer. A request for Qwen to report compaction structurally is being drafted. ## Tests and CI - Native regressions read each `resumedSessionOptions` declaration and verify supplied and omitted values before and after native compaction: Claude via `/compact`, Codex via native automatic compaction, Qwen via `/compress`, Pi and Pi Durable via native compaction. A registry test pins which runtimes declare entries and that no declared option is also refused (#606). - Qwen and Pi resumed-prompt regressions (#605). - Pi provider tests no longer depend on DeepSeek or Anthropic credentials in the host environment (#604). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
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.
Host provider credentials can make Pi fixture assertions fail even when their temporary auth store is empty. Clear DeepSeek and Anthropic credential variables around the three provider/catalog fixtures that assume no ambient authentication, then restore the original environment after each test. Product auth resolution and existing assertions are unchanged.
Validation: reproduced the original two failures with a synthetic
DEEPSEEK_API_KEY; all 38 provider tests pass with synthetic DeepSeek, Anthropic and Groq credentials present.CI=1 pnpm run checkpasses (2,984 tests and 18 mock behaviors).Task #152.