-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Adding ACP agent to agents.list silently hijacks all routing from implicit main agent #44375
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
Adding a single ACP-bound agent to
agents.list(e.g. for a persistent Codex binding on a Telegram topic) silently takes over as the default agent for all traffic — DMs, every group topic, heartbeats, crons — replacing the implicitmainagent. No warning is shown. The user has no indication that their primary agent identity has changed.Steps to Reproduce
agents.listentries, implicitmainagent with 596+ sessions of history).openclaw config set agents.list '[{"id":"codex-cubby","runtime":{"type":"acp","acp":{"agent":"codex","backend":"acpx","mode":"persistent","cwd":"/path/to/project"}}}]'Expected Behavior
codex-cubby.main.mainagent would be displaced, show a warning.Actual Behavior
codex-cubbybecause it is the first (and only) entry inagents.list, making it the default per the routing fallback rule.mainagent is completely abandoned — 596 sessions, QMD index, auth profiles, all orphaned.~/.openclaw/agents/codex-cubby/with fresh history.agent:main:...toagent:codex-cubby:..., breaking any hardcoded references (e.g. in HEARTBEAT.mdsessions_historycalls).Impact
main, now unused).Suggested Fixes
mainwould be displaced. Ifagents.listis being set for the first time and does not include an entry withid: "main"ordefault: true, warn the user that the implicit main agent will no longer receive traffic.agents.listis populated, auto-add{"id": "main", "default": true}if no default is specified andmainagent state exists on disk.default: true. Instead of falling back to "first list entry," require at least one entry to havedefault: truewhen multiple agents exist (or when any agent is added).Environment
openclaw config setfrom an agent topic sessionWorkaround
Delete the ACP agent from
agents.list, merge its sessions back intomain, and restart. Requires manual session file migration and sessions.json re-keying.