You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: 2 delegate tests fail because 'Agent' alias is recorded as action instead of canonical 'delegate_agent' #33
```
git checkout main
pytest tests/test_agent_runtime.py::AgentRuntimeTests::test_agent_can_delegate_to_nested_agent
pytest tests/test_agent_runtime.py::AgentRuntimeTests::test_agent_can_delegate_with_topological_batches
```
Both fail on origin/main alone (no local changes).
Symptom
```
AssertionError: 'Agent' != 'delegate_agent'
Agent
delegate_agent
```
Root cause
Origin/main introduced `'Agent'` as an alias for `'delegate_agent'` in the tool dispatch path (`src/agent_runtime.py` around line 1258 in current main: `if tool_call.name in ('Agent', 'delegate_agent')`). When the alias `'Agent'` is the actual tool name used by the model, the action recorded in metadata / file_history is `'Agent'`, but the tests assert the canonical `'delegate_agent'`.
Two fixes possible
Test-side: update `test_agent_can_delegate_to_nested_agent` and `test_agent_can_delegate_with_topological_batches` to accept either alias (`metadata.get('action') in ('Agent', 'delegate_agent')`).
Source-side: normalize the recorded action to the canonical form (`'delegate_agent'`) regardless of which alias the model used. Probably the right call since the alias is a model-facing convenience, not a runtime-state distinction.
Why I'm filing
Hit this while verifying merge-conflict resolutions on a feature branch (PR #32). Failures reproduce on pure origin/main with no local changes, so they're not from my work.
Activity
refactor: drop dead `agent_def is not None` check in child-permission…
fix(delegate): record canonical 'delegate_agent' action regardless of…