Skip to content

Steer direct-inbox DMs into running Antigravity ACP turns during active goals - #5232

Merged
trissim merged 1 commit into
mainfrom
fix/steer-direct-inbox-active-goal
Nov 28, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/steer-direct-inbox-active-goal

Conversation

@trissim

@trissim trissim commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix direct-inbox mid-turn steering (_steer_direct_inbox) on AntigravityAcpBackend threads with an active persistent goal (src/agent_comms/execution/input_drain.py:1523).

Root Cause

InputDrain._steer_direct_inbox (input_drain.py:1523) gated steering on owner.goal.accepts_following_handoff() alongside drain_direct_inbox (:1567). Because drain_direct_inbox also returns early when a goal is active (so it does not race the goal scheduler with a RoutedOriginalInput), EVERY incoming human DM or waking bus message to an antigravity_acp thread running a persistent goal was silently skipped:

  • never steered mid-turn via DirectDeliveredInput.deliver_direct (even though DeliveredFollowingInput inherits DirectInput and BusDeliveredInput.source() already mints AcceptedGoalPermission(active_goal_id)),
  • never steered at OwnedTurn.prepare_native (owned_turn.py:476),
  • never recorded a harness_deliveries read receipt — leaving Android/Qt DMs permanently stuck on Sent while the persistent goal kept looping turn after turn.

Fix

  • Drop or owner.goal.accepts_following_handoff() from _steer_direct_inbox (src/agent_comms/execution/input_drain.py:1523), keeping the guard only on idle drain_direct_inbox (:1567) where spawning a separate RoutedOriginalInput would conflict with the active goal scheduler.
  • Add regression test test_antigravity_acp_steers_dm_during_active_persistent_goal in tests/test_antigravity_acp_backend.py proving a DM sent during an active persistent goal steers into the live ACP turn, records "1 read", and emits zero diagnostics.

Verification

  • tests/test_antigravity_acp_backend.py: 10 passed in 8.83s.
  • REL_IMPORTS=0.

@trissim
trissim merged commit 4c03c83 into main Nov 28, 2026
1 of 3 checks passed
@trissim
trissim deleted the fix/steer-direct-inbox-active-goal branch November 28, 2026 00:39
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