mirror of https://github.com/openclaw/openclaw.git
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:
parent
7a0591ef87
commit
b0dfb83952
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue