Severity: Medium — anyone calling Agent.step_user_message directly hits TypeError immediately. The production REST path is unaffected because it routes through server.send_messages → _step, not through step_user_message.
Where
mirix/agent/agent.py:2599 on origin/main.
Reproduction
agent = await server.load_agent(agent_id, actor=client)
await agent.step_user_message("hello")
# TypeError: Agent.inner_step() missing 1 required positional argument: 'first_input_messge'
Root cause
step_user_message calls:
return await self.inner_step(messages=[user_message], **kwargs)
but inner_step's signature requires first_input_messge as a positional argument (the typo is in the original):
async def inner_step(
self,
first_input_messge: Message,
messages: Union[Message, List[Message]],
...
):
Suggested fix
One-line change at mirix/agent/agent.py:2599:
return await self.inner_step(first_input_messge=user_message, messages=[user_message], **kwargs)
Plus a behavioral test in tests/test_agent.py that mocks _get_ai_reply and calls step_user_message, asserting it returns an AgentStepResponse without raising.
Discovery
Surfaced during end-to-end validation of #126 (top-level session_id feature). That PR works around this bug by driving the agent through the production code path server.send_messages → _step (the same path used by REST → queue worker), so step_user_message is never called. This bug is therefore independent of #126 — just a pre-existing latent issue made visible during testing.
Codex review of #126 also flagged this as a medium-severity finding unrelated to that work.
🤖 Generated with Claude Code
Severity: Medium — anyone calling
Agent.step_user_messagedirectly hitsTypeErrorimmediately. The production REST path is unaffected because it routes throughserver.send_messages → _step, not throughstep_user_message.Where
mirix/agent/agent.py:2599onorigin/main.Reproduction
Root cause
step_user_messagecalls:but
inner_step's signature requiresfirst_input_messgeas a positional argument (the typo is in the original):Suggested fix
One-line change at
mirix/agent/agent.py:2599:Plus a behavioral test in
tests/test_agent.pythat mocks_get_ai_replyand callsstep_user_message, asserting it returns anAgentStepResponsewithout raising.Discovery
Surfaced during end-to-end validation of #126 (top-level
session_idfeature). That PR works around this bug by driving the agent through the production code pathserver.send_messages → _step(the same path used by REST → queue worker), sostep_user_messageis never called. This bug is therefore independent of #126 — just a pre-existing latent issue made visible during testing.Codex review of #126 also flagged this as a medium-severity finding unrelated to that work.
🤖 Generated with Claude Code