Skip to content

Per-agent heartbeat.model config is ignored #9742

@CyberSinister

Description

@CyberSinister

Bug

The heartbeat.model override works in agents.defaults.heartbeat.model but is ignored when set per-agent in agents.list[].heartbeat.model.

Config Example

{
  "agents": {
    "defaults": {
      "model": { "primary": "anthropic/claude-opus-4-5" }
    },
    "list": [
      {
        "id": "kev",
        "heartbeat": {
          "every": "5m",
          "model": "google/gemini-3-pro-preview"  // ❌ Ignored
        }
      }
    ]
  }
}

Expected

Heartbeat runs for agent kev should use google/gemini-3-pro-preview.

Actual

Heartbeat runs still use anthropic/claude-opus-4-5 (the default model).

Root Cause

In src/auto-reply/reply/get-reply.ts:

const agentCfg = cfg.agents?.defaults;  // ❌ Only reads defaults
// ...
const heartbeatRaw = agentCfg?.heartbeat?.model?.trim() ?? "";

The code reads heartbeat.model only from agents.defaults, never from the resolved per-agent config.

Workaround

Set heartbeat.model in agents.defaults.heartbeat instead of per-agent.

Suggested Fix

Use the merged agent config (with per-agent overrides applied) instead of just cfg.agents?.defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions