mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(cron): use requested agentId for isolated job auth resolution (#13983)
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -124,7 +124,10 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
? resolveAgentConfig(params.cfg, normalizedRequested)
|
||||
: undefined;
|
||||
const { model: overrideModel, ...agentOverrideRest } = agentConfigOverride ?? {};
|
||||
const agentId = agentConfigOverride ? (normalizedRequested ?? defaultAgentId) : defaultAgentId;
|
||||
// Use the requested agentId even when there is no explicit agent config entry.
|
||||
// This ensures auth-profiles, workspace, and agentDir all resolve to the
|
||||
// correct per-agent paths (e.g. ~/.openclaw/agents/<agentId>/agent/).
|
||||
const agentId = normalizedRequested ?? defaultAgentId;
|
||||
const agentCfg: AgentDefaultsConfig = Object.assign(
|
||||
{},
|
||||
params.cfg.agents?.defaults,
|
||||
|
||||
Reference in New Issue
Block a user