Skip to content

fix(agent_loop): bridge APPROVAL_REQUIRED events to LiveEventManager for frontend dialog (#4959)#4974

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-4959
Apr 17, 2026
Merged

fix(agent_loop): bridge APPROVAL_REQUIRED events to LiveEventManager for frontend dialog (#4959)#4974
mrveiss merged 1 commit intoDev_new_guifrom
issue-4959

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 17, 2026

Closes #4959

Summary

  • Added publish_live_event("global", "tool_approval_required", {...}) call in _request_approval() in agent_loop/loop.py immediately after the existing RedisEventStreamManager publish
  • Payload includes: approval_id, tool_name, arguments, reason, risk_level, timeout_seconds, task_id
  • Bridges the two disconnected event buses so the frontend WebSocket subscribers receive the event and can show the approval dialog

Test Status

PASS — py_compile clean on loop.py and live_event_manager.py

…for frontend dialog (#4959)

RedisEventStreamManager (agent_loop) and LiveEventManager (WebSocket/frontend) are
two disconnected event buses. After publishing APPROVAL_REQUIRED to the Redis bus,
also call publish_live_event("global", "tool_approval_required", ...) so the
WebSocket layer receives the event and the frontend approval dialog fires.
@mrveiss mrveiss merged commit e9aa270 into Dev_new_gui Apr 17, 2026
1 of 3 checks passed
@mrveiss mrveiss deleted the issue-4959 branch April 17, 2026 08:02
mrveiss added a commit that referenced this pull request Apr 17, 2026
…se (#5014, #4959)

PR #4974 bridged tool-approval events to LiveEventManager using the
lowercase literal "tool_approval_required", but the frontend filter
expects "APPROVAL_REQUIRED". Result: the bridged event was silently
dropped and the approval dialog never fired despite #4959 appearing
fixed.

Align by importing EVT_APPROVAL_REQUIRED from the new events.event_types
module.

Closes #5014.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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