mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:54:32 +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)
|
? resolveAgentConfig(params.cfg, normalizedRequested)
|
||||||
: undefined;
|
: undefined;
|
||||||
const { model: overrideModel, ...agentOverrideRest } = agentConfigOverride ?? {};
|
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(
|
const agentCfg: AgentDefaultsConfig = Object.assign(
|
||||||
{},
|
{},
|
||||||
params.cfg.agents?.defaults,
|
params.cfg.agents?.defaults,
|
||||||
|
|||||||
Reference in New Issue
Block a user