diff --git a/lib/agens/job.ex b/lib/agens/job.ex index 103242b..f14caa1 100644 --- a/lib/agens/job.ex +++ b/lib/agens/job.ex @@ -316,7 +316,7 @@ defmodule Agens.Job do :end -> GenServer.cast(self(), :end) - step_index when is_integer(step_index) -> + step_index -> GenServer.cast(self(), {:step, step_index, message}) end end diff --git a/test/agens/agent_test.exs b/test/agens/agent_test.exs index cd55c04..697ac4c 100644 --- a/test/agens/agent_test.exs +++ b/test/agens/agent_test.exs @@ -206,7 +206,7 @@ defmodule Agens.AgentTest do assert_receive {:tool_raw, {^job_name, 0}, %{}} assert_receive {:tool_result, {^job_name, 0}, "TRUE"} assert_receive {:step_result, {^job_name, 0}, "TRUE"} - assert_receive {:job_ended, :test_prompt_job, :complete} + assert_receive {:job_ended, ^job_name, :complete} end end end