Skip to content

[BUG] when I ask my agent to do perform a task every hour of the day I now get channel error #1757

@dhensen

Description

@dhensen

Quick Summary

Environment & Tools

  • PicoClaw Version: v0.2.3
  • Go Version: go 1.23
  • AI Model & Provider: ollama glm-4.7-flash:latest
  • Operating System: raspbian 11 (Rpi Zero W)
  • Channels: Telegram

📸 Steps to Reproduce

  1. I've asked my agent to keep looking at a product every hour and report if the price changes.

🪵 Logs

17:51:39 INF agent  loop.go:1222 (agent.(*AgentLoop).runLLMIteration) > LLM requested tool calls agent_id=main count=1 iteration=4 tools=["cron"]
17:51:39 INF agent  loop.go:1281 (agent.(*AgentLoop).runLLMIteration.func2) > Tool call: cron({"action":"add","command":"/home/dino/.picoclaw/workspace/check_gpu_price.sh","command_confirm":true,"cron_expr":"0 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 * * *","job_id":"gpu_
price_tracker","m...) agent_id=main iteration=4 tool=cron
17:51:39 INF tool   registry.go:168 (tools.(*ToolRegistry).ExecuteWithContext) > Tool execution started args={"action":"add","command":"/home/dino/.picoclaw/workspace/check_gpu_price.sh","command_confirm":true,"cron_expr":"0 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 * * *"
,"job_id":"gpu_price_tracker","message":"GPU Price Monitor: Script executed to check NVIDIA RTX PRO 6000 price"} tool=cron
17:51:39 ERR tool   registry.go:204 (tools.(*ToolRegistry).ExecuteWithContext) > Tool execution failed error="scheduling command execution is restricted to internal channels" duration=0 tool=cron
17:51:45 INF agent  loop.go:1222 (agent.(*AgentLoop).runLLMIteration) > LLM requested tool calls agent_id=main count=1 iteration=5 tools=["cron"]
17:51:45 INF agent  loop.go:1281 (agent.(*AgentLoop).runLLMIteration.func2) > Tool call: cron({"action":"add","command":"/home/dino/.picoclaw/workspace/check_gpu_price.sh","cron_expr":"0 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 * * *","job_id":"gpu_price_monitor_8-22","me
ssage":"GPU Price...) agent_id=main iteration=5 tool=cron
17:51:45 INF tool   registry.go:168 (tools.(*ToolRegistry).ExecuteWithContext) > Tool execution started args={"action":"add","command":"/home/dino/.picoclaw/workspace/check_gpu_price.sh","cron_expr":"0 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 * * *","job_id":"gpu_price_mo
nitor_8-22","message":"GPU Price Monitor: NVIDIA RTX PRO 6000 Blackwell Max-Q - Hourly check (8:00-22:00)"} tool=cron
17:51:45 ERR tool   registry.go:204 (tools.(*ToolRegistry).ExecuteWithContext) > Tool execution failed error="scheduling command execution is restricted to internal channels" duration=0 tool=cron
17:51:50 INF agent  loop.go:1222 (agent.(*AgentLoop).runLLMIteration) > LLM requested tool calls agent_id=main count=1 iteration=6 tools=["cron"]
17:51:50 INF agent  loop.go:1281 (agent.(*AgentLoop).runLLMIteration.func2) > Tool call: cron({"action":"add","every_seconds":3600,"job_id":"gpu_price_monitor","message":"GPU Price Monitor: NVIDIA RTX PRO 6000 Blackwell Max-Q - Hourly price check from 8:00-22:00"}) agent_id
=main iteration=6 tool=cron
17:51:50 INF tool   registry.go:168 (tools.(*ToolRegistry).ExecuteWithContext) > Tool execution started args={"action":"add","every_seconds":3600,"job_id":"gpu_price_monitor","message":"GPU Price Monitor: NVIDIA RTX PRO 6000 Blackwell Max-Q - Hourly price check from 8:00-22
:00"} tool=cron

my problem is with the lines saying: scheduling command execution is restricted to internal channels

❌ Actual Behavior

I see failures in my logs. No hourly reports are sent to me.

✅ Expected Behavior

I expected it to report hourly.

💬 Additional Context

#1647

How does this work:

// Package constants provides shared constants across the codebase.
package constants
// internalChannels defines channels that are used for internal communication
// and should not be exposed to external users or recorded as last active channel.
var internalChannels = map[string]struct{}{
"cli": {},
"system": {},
"subagent": {},
}
// IsInternalChannel returns true if the channel is an internal channel.
func IsInternalChannel(channel string) bool {
_, found := internalChannels[channel]
return found
}

Is telegram the channel I get the error for? why is there only cli, system, subagent. How is this feature supposed to work? I don't understand, maybe this is not a bug?

I have tools.cron.allow_command=true in my config

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions