diff --git a/pkg/tools/spawn_status_test.go b/pkg/tools/spawn_status_test.go index 89e6bfe3a..fcd3c4a36 100644 --- a/pkg/tools/spawn_status_test.go +++ b/pkg/tools/spawn_status_test.go @@ -384,7 +384,11 @@ func TestSpawnStatusTool_ChannelFiltering_NoContext(t *testing.T) { tool := NewSpawnStatusTool(manager) - // No tool context (e.g. CLI) — callerChannel and callerChatID are both "". + // No ToolContext injected (e.g. a direct programmatic call that bypasses + // WithToolContext entirely) — callerChannel and callerChatID are both "". + // Note: the normal CLI path uses ProcessDirectWithChannel("cli", "direct"), + // which *does* inject a non-empty context; this test covers the case where + // no context injection happens at all. // The filter conditions require a non-empty caller value, so all tasks pass through. result := tool.Execute(context.Background(), map[string]any{}) if result.IsError { diff --git a/pkg/tools/subagent.go b/pkg/tools/subagent.go index fc13c0f09..40c9e6ae9 100644 --- a/pkg/tools/subagent.go +++ b/pkg/tools/subagent.go @@ -111,7 +111,6 @@ func (sm *SubagentManager) Spawn( func (sm *SubagentManager) runTask(ctx context.Context, task *SubagentTask, callback AsyncCallback) { sm.mu.Lock() task.Status = "running" - task.Created = time.Now().UnixMilli() sm.mu.Unlock() // Build system prompt for subagent