Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 967c8f54a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for history_files in self._agent_card_histories.values(): | ||
| for history_file in history_files: | ||
| try: | ||
| if history_file.is_relative_to(root): | ||
| current_history_files.add(history_file) |
There was a problem hiding this comment.
Watch history files for single-card roots
When load_agents is called with a file path (supported by _collect_agent_card_files), root is the card file itself, so history_file.is_relative_to(root) is false for history files in the same directory. That means history files are never added to the watch set for single-card roots, so edits to those message files won’t trigger reload/refresh even though this change intends to watch them. Consider using root.parent when root is a file, or otherwise normalizing the watch root to a directory so history files are included.
Useful? React with 👍 / 👎.
Summary
Testing
uv run pytest tests/unit/fast_agent/core/test_agent_card_watch.py::test_reload_agents_updates_history_when_file_newer