Skip to content

test(codex): tolerate date context after tool results - #615

Open
stamp-build[bot] wants to merge 1 commit into
mainfrom
agent/otter/codex-date-context
Open

stamp-build[bot] wants to merge 1 commit into
mainfrom
agent/otter/codex-date-context

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Otter from open-agent-runtime opened this pull request through Stamp
View in Stamp →


Codex can append a native environment_context after a successful tool result when the UTC date changes. The scripted two-round fixture required the tool result to be the last message and treated that context as a new user turn, causing a provider 404 after both tools had run.

Match the latest tool result after the latest non-context user message. Keep the three stages exclusive, restart for a real new user turn, and reject an unrelated latest result even if history or context contains a matching marker. Existing vendor tool-framing assertions remain unchanged.

Validation: five deterministic Responses API fixture tests cover date refresh after either or both results, a normal request, new-turn reset, and stale-marker refusal; the three refresh cases fail on the original fixture. Replaying the original CI request changes the post-refresh response from 404 to 200. The existing real-tool framing case passes for Codex, Claude, Pi SDK and Pi RPC. CI=1 pnpm run check passed (3,146 tests and 18 mock behavior checks); build 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.

0 participants