Skip to content

fix(agent): add missing 'Any' import in agent_loop.py#5724

Open
kh-mitya wants to merge 1 commit into
odysseus-dev:mainfrom
kh-mitya:fix/any-import-agent-loop
Open

fix(agent): add missing 'Any' import in agent_loop.py#5724
kh-mitya wants to merge 1 commit into
odysseus-dev:mainfrom
kh-mitya:fix/any-import-agent-loop

Conversation

@kh-mitya

@kh-mitya kh-mitya commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Commit cf4e240a ("Merge verified Odysseus fixes") added two functions to src/agent_loop.py that use dict[str, Any] in their type annotations, but did not add Any to the typing import on line 15. This causes an immediate NameError on startup — Odysseus fails to start entirely on both main and dev branches.

The fix is a one-line change: add Any to the existing from typing import ... statement.

Target branch

  • This PR targets *dev and main.

Linked Issue

Fixes #5723

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app and verified the change works end-to-end.

How to Test

  1. git checkout main (or dev — same bug on both)
  2. python3 -c "from src.agent_loop import stream_agent_loop" — raises NameError: name 'Any' is not defined
  3. Apply this PR, repeat step 2 — import succeeds, no error

dict[str, Any] is used in _resolved_tool_event_name (L1503) and
_ody_qwen_terminal_tool_summary (L1877) but Any was not imported.

Fixes odysseus-dev#5723
@github-actions github-actions Bot added needs work PR description incomplete — please update before review ready for review Description complete — ready for maintainer review and removed needs work PR description incomplete — please update before review ready for review Description complete — ready for maintainer review labels Jul 24, 2026
@kh-mitya
kh-mitya changed the base branch from main to dev July 24, 2026 02:15
@kh-mitya
kh-mitya changed the base branch from dev to main July 24, 2026 02:18
@dabockster

Copy link
Copy Markdown

I just ran into this issue myself. The whole program is broken until this gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NameError: 'Any' not imported in agent_loop.py (main & dev)

2 participants