Skip to content

[BUG] Agent run heartbeat from example in HEARTBEAT.md #1824

@3mp3ri0r

Description

@3mp3ri0r

Quick Summary

In a non stable environment, the app that is run using container like podman, usually get restarted due to receiving SIGINT or SIGTERM. After the container restarted due to unhealthy condition, agent trigger the heartbeat and it execute what is written on HEARTBEAT.md, in my case it execute the pre-written example.

Environment & Tools

  • PicoClaw Version: 7673b62
  • Go Version: go 1.25
  • AI Model & Provider: openrouter/nvidia/nemotron-3-nano-30b-a3b:free
  • Operating System: Oracle Linux Server 9.7
  • Channels: Telegram

📸 Steps to Reproduce

  1. Run picoclaw

❌ Actual Behavior

My telegram account receiving tool_call info after the app restarted.

Image

✅ Expected Behavior

No telegram account receive any tool_call info after the app restarted.

💬 Additional Context

Sample log:

04:56:43 INF src/pkg/channels/telegram/command_registration.go:88 > Telegram commands registered component=telegram count=8
04:56:45 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=1 tools=["exec"]
04:56:45 INF src/pkg/agent/loop.go:1318 > Tool call: exec({"command":"ls -la /home/picoclaw/.picoclaw/workspace"}) agent_id=main component=agent iteration=1 tool=exec
04:56:45 INF src/pkg/tools/registry.go:168 > Tool execution started args={"command":"ls -la /home/picoclaw/.picoclaw/workspace"} component=tool tool=exec
04:56:45 INF src/pkg/tools/registry.go:250 > Tool execution completed component=tool duration_ms=2 result_length=523 tool=exec
04:56:47 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=2 tools=["read_file"]
04:56:47 INF src/pkg/agent/loop.go:1318 > Tool call: read_file({"path":"/home/picoclaw/.picoclaw/workspace/HEARTBEAT.md"}) agent_id=main component=agent iteration=2 tool=read_file
04:56:47 INF src/pkg/tools/registry.go:168 > Tool execution started args={"path":"/home/picoclaw/.picoclaw/workspace/HEARTBEAT.md"} component=tool tool=read_file
04:56:47 INF src/pkg/tools/registry.go:250 > Tool execution completed component=tool duration_ms=0 result_length=815 tool=read_file
04:56:54 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=3 tools=["exec"]
04:56:54 INF src/pkg/agent/loop.go:1318 > Tool call: exec({"command":"ls -la /home/picoclaw/.picoclaw/workspace/cron"}) agent_id=main component=agent iteration=3 tool=exec
04:56:54 INF src/pkg/tools/registry.go:168 > Tool execution started args={"command":"ls -la /home/picoclaw/.picoclaw/workspace/cron"} component=tool tool=exec
04:56:54 INF src/pkg/tools/registry.go:250 > Tool execution completed component=tool duration_ms=1 result_length=194 tool=exec
04:56:56 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=4 tools=["read_file"]
04:56:56 INF src/pkg/agent/loop.go:1318 > Tool call: read_file({"path":"/home/picoclaw/.picoclaw/workspace/cron/jobs.json"}) agent_id=main component=agent iteration=4 tool=read_file
04:56:56 INF src/pkg/tools/registry.go:168 > Tool execution started args={"path":"/home/picoclaw/.picoclaw/workspace/cron/jobs.json"} component=tool tool=read_file
04:56:56 INF src/pkg/tools/registry.go:250 > Tool execution completed component=tool duration_ms=0 result_length=124 tool=read_file
04:56:58 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=5 tools=["find_skills"]
04:56:58 INF src/pkg/agent/loop.go:1318 > Tool call: find_skills({"limit":5,"query":"check unread messages calendar events device status"}) agent_id=main component=agent iteration=5 tool=find_skills
04:56:58 INF src/pkg/tools/registry.go:168 > Tool execution started args={"limit":5,"query":"check unread messages calendar events device status"} component=tool tool=find_skills
04:56:58 ERR src/pkg/tools/registry.go:237 > Tool execution failed error="skill search failed: no registries configured" component=tool duration=0 tool=find_skills
04:57:03 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=6 tools=["find_skills"]
04:57:03 INF src/pkg/agent/loop.go:1318 > Tool call: find_skills({"limit":5,"query":"unread messages"}) agent_id=main component=agent iteration=6 tool=find_skills
04:57:03 INF src/pkg/tools/registry.go:168 > Tool execution started args={"limit":5,"query":"unread messages"} component=tool tool=find_skills
04:57:03 ERR src/pkg/tools/registry.go:237 > Tool execution failed error="skill search failed: no registries configured" component=tool duration=0 tool=find_skills
04:57:06 INF src/pkg/agent/loop.go:1259 > LLM requested tool calls agent_id=main component=agent count=1 iteration=7 tools=["find_skills"]
04:57:06 INF src/pkg/agent/loop.go:1318 > Tool call: find_skills({"limit":5,"query":"unread messages"}) agent_id=main component=agent iteration=7 tool=find_skills
04:57:06 INF src/pkg/tools/registry.go:168 > Tool execution started args={"limit":5,"query":"unread messages"} component=tool tool=find_skills
04:57:06 ERR src/pkg/tools/registry.go:237 > Tool execution failed error="skill search failed: no registries configured" component=tool duration=0 tool=find_skills
04:57:08 INF src/pkg/agent/loop.go:1240 > LLM response without tool calls (direct answer) agent_id=main component=agent content_chars=12 iteration=8
04:57:08 INF src/pkg/agent/loop.go:955 > Response: HEARTBEAT_OK agent_id=main component=agent final_length=12 iterations=8 session_key=heartbeat

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