Skip to content

Daemon: a SigV4 refusal dated far from its signing is clock skew; history reads leave out replayed opaque state - #564

Merged
lydakis merged 4 commits into
mainfrom
claude/project-thread-19d030
Oct 31, 2026
Merged

lydakis merged 4 commits into
mainfrom
claude/project-thread-19d030

Conversation

@lydakis

@lydakis lydakis commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

What

Two small daemon fixes found in a week of everyday use of 0.7.0.

A SigV4 refusal is clock skew when its Date says so

  • A Bedrock call signed just before the machine slept can reach AWS long after it was signed. AWS then refuses it with a 401 or 403 whose error type isn't always one of the clock-skew codes we already retry.
  • Now a 401 or 403 on a signed call also counts as skew when the response's Date header is more than four minutes from when the request was signed. That is the AWS SDK for Java's rule.
  • Like the named codes, it retries at once as provider_signature_expired, signed again with the time now. Before, it failed the turn.
  • docs/RUST_PROTOTYPE.md says so.

History reads leave out the opaque state Claude replays

  • history returned each assistant item whole, including thinking.signature, redacted_thinking.data and web_search_tool_result's encrypted_content. These are opaque blobs only the provider reads, and they can be many KiB per item.
  • History reads now drop those fields. What the model gets back is unchanged: requests are built from the store, not from this view.
  • tests/store_contract.rs pins the new view, and a unit test covers each blob.

The restart part of this work (running turns park on shutdown and continue at the next start) moved to its own PR in another thread.

Tests

  • cargo test -p agent-runtime --lib -- aws history: 18 passed.
  • cargo test -p agent-runtime --test store_contract: 212 passed.

No protocol or schema change.

A SigV4 refusal is told as clock skew when the error names it, or when
the response's Date is more than four minutes from when the request was
signed, the AWS SDK for Java's rule. A machine that slept with a signed
request in flight now re-signs instead of failing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
The `history` tool's view already dropped reasoning items' encrypted
content. It now also drops a thinking block's signature, a redacted
thinking block's data, and a web search result's encrypted content:
bytes the provider hands back only to be replayed, which no agent can
read. Thinking text stays; stored items, raw reads, forks and replay are
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T23:09:01.464331Z 5b53ca6 New commits
🔒 Security Review ✅ Completed 2026-10-31T22:57:58.191500Z 35d80f4 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.

The history view's READING_ITEM now matches quoted JSON keys, and the
planner's constant pattern stopped at its first escaped quote.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
@lydakis
lydakis merged commit 811a7c4 into main Oct 31, 2026
9 of 10 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.

2 participants