Fix agent safety and reliability regressions - #255
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 105a28c923
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex pls review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Why
A review of the recent agent changes found several cases where malformed model output, ambiguous iframe state, transient provider failures, or storage pressure could cause unsafe dispatch, incorrect state, or lost UI/session data. The fixes address the root causes at validation and state-transition boundaries instead of masking downstream symptoms.
Impact
Agent actions now remain source- and origin-bound, malformed calls cannot dispatch with missing arguments, provider and persistence failures recover predictably, and browser-specific implementations retain parity.
Validation
npm test— 33 toolbar guard tests, 1,676 core tests, and 60 security checksnpm run test:fixtures— 165 browser fixture testsnpm run test:ci— 14 CI scenarios and cloud capturegit diff --check origin/main...HEAD