refactor(background-agent): normalize task ID field naming

Rename BackgroundTask and attempt ID fields to camelCase across background-agent consumers while moving BackgroundManager construction to a single config object.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-02 03:01:03 +09:00
parent 054ade9ced
commit da251c9b30
57 changed files with 1299 additions and 1327 deletions
@@ -33,8 +33,8 @@ export async function executeUnstableAgentTask(
description: args.description,
prompt: effectivePrompt,
agent: agentToUse,
parentSessionID: parentContext.sessionID,
parentMessageID: parentContext.messageID,
parentSessionId: parentContext.sessionID,
parentMessageId: parentContext.messageID,
parentModel: parentContext.model,
parentAgent: parentContext.agent,
parentTools: getSessionTools(parentContext.sessionID),
@@ -48,7 +48,7 @@ export async function executeUnstableAgentTask(
const timing = getTimingConfig()
const waitStart = Date.now()
let sessionID = task.sessionID
let sessionID = task.sessionId
while (!sessionID && Date.now() - waitStart < timing.WAIT_FOR_SESSION_TIMEOUT_MS) {
if (ctx.abort?.aborted) {
cleanupReason = "Parent aborted while waiting for unstable task session start"
@@ -56,7 +56,7 @@ export async function executeUnstableAgentTask(
}
await new Promise(resolve => setTimeout(resolve, timing.WAIT_FOR_SESSION_INTERVAL_MS))
const updated = manager.getTask(task.id)
sessionID = updated?.sessionID
sessionID = updated?.sessionId
}
if (!sessionID) {
cleanupReason = "Unstable task session start timed out before session became available"