Skip to content

Extract agent event loop - #145

Merged
NSIETeam merged 1 commit into
mainfrom
codex/extract-event-loop
Jul 31, 2026
Merged

NSIETeam merged 1 commit into
mainfrom
codex/extract-event-loop

Conversation

@NSIETeam

Copy link
Copy Markdown
Owner

Summary

  • move top-level inbound consume/route/schedule loop into mira.agent.agent_event_loop
  • keep AgentLoop.run as a compatibility wrapper
  • preserve runtime control routing, priority command dispatch, automation deferral, pending-queue injection routing, dispatch task tracking, timeout compaction checks, and MCP cleanup

Local validation

  • uv run python -m pytest tests/agent/test_task_cancel.py tests/agent/test_unified_session.py tests/agent/test_runner_injections.py tests/agent/test_auto_compact.py -q
  • uv run ruff check mira/agent/agent_event_loop.py mira/agent/loop.py
  • uv run mypy
  • uv run python -m pytest tests/agent tests/tools/test_message_tool.py tests/command -q

Issue progress

  • Contributes to issue 120 by reducing mira/agent/loop.py from 1303 to 1209 lines. It remains open because the target is <=800 lines.

@NSIETeam
NSIETeam merged commit b5c0ab5 into main Jul 31, 2026
6 checks passed
@NSIETeam
NSIETeam deleted the codex/extract-event-loop branch July 31, 2026 06:22
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