Skip to content

fix: auto-supersede stale secure env requests instead of rejecting with busy#531

Merged
kwannoel merged 1 commit intomainfrom
session-3-a7efa1
Mar 20, 2026
Merged

fix: auto-supersede stale secure env requests instead of rejecting with busy#531
kwannoel merged 1 commit intomainfrom
session-3-a7efa1

Conversation

@kwannoel
Copy link
Copy Markdown
Owner

Summary

  • When a controller-cli process dies before the user interacts with the secure env modal, the active request state was never cleaned up, permanently blocking all future requests with "busy"
  • New requests now auto-cancel any existing stale request by sending a "superseded" response through the old channel, unblocking the stuck handler thread
  • Removed dead "busy" error mapping code path

Test plan

  • Rust tests pass (including 2 new tests: supersedes_existing_active_secure_env_request, supersede_notifies_previous_cli_via_channel, supersedes_existing_request_and_dispatches_new_one)
  • Frontend tests pass (286/286)
  • Manual: run controller-cli env set twice — second call should succeed instead of returning "busy"

🤖 Generated with Claude Code

…th busy

When a controller-cli process dies before the user interacts with the
modal, the active request state was never cleaned up, permanently
blocking all future requests with "busy". Now, new requests auto-cancel
any existing one by sending a "superseded" response through the old
channel, unblocking the stuck handler thread.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kwannoel kwannoel merged commit 9ced36f into main Mar 20, 2026
1 of 3 checks passed
@kwannoel kwannoel deleted the session-3-a7efa1 branch March 20, 2026 07:44
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.

1 participant