Skip to content

Fix/ulw session restore#192

Open
zbochuan wants to merge 2 commits into
openonion:mainfrom
zbochuan:fix/ulw-session-restore
Open

Fix/ulw session restore#192
zbochuan wants to merge 2 commits into
openonion:mainfrom
zbochuan:fix/ulw-session-restore

Conversation

@zbochuan

@zbochuan zbochuan commented Jul 11, 2026

Copy link
Copy Markdown

Related Issue

Fixes #191

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Changes Made

  • Added mode, skip_tool_approval, ulw_turns, ulw_turns_used to the session reconstruction whitelist in Agent.input()
  • Uses the same whitelist pattern rather than dict(session), so transient keys (permissions, stop_signal, pending_tool) remain blocked
  • Added test_input_preserves_plugin_session_fields and test_input_does_not_leak_transient_keys

Testing

  • I have tested this code locally
  • All existing tests pass
  • I have added tests for new functionality

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally
  • Any dependent changes have been merged and published

zbochuan added 2 commits July 11, 2026 12:58
mode, skip_tool_approval, ulw_turns, ulw_turns_used were dropped by
the whitelist in Agent.input(), causing ULW to revert to Safe mode.

@sanmaxdev sanmaxdev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explicit session-field allowlist preserves ULW state without restoring unrelated request data. The focused ULW, approval, and session tests pass, and the new regression coverage checks both preservation and exclusion.

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.

[BUG] Agent.input(session=…) drops plugin session fields — ULW mode silently resets to Safe

2 participants