fix(background-agent): exempt council members from TTL pruning + fix promptFileMoved scope

Council members now skip TTL check in poller via isCouncilMemberAgent()
prefix match, covering both interactive (task tool) and bulk (athena_council)
launch paths. Users can cancel manually if needed.

Also fix promptFileMoved variable scoping: move declaration before try block
so finally block can access it. Dynamic timeout in error messages.
This commit is contained in:
ismeth
2026-03-14 20:59:49 +01:00
committed by YeonGyu-Kim
parent 44b3efe7a3
commit ff2ff8143d
@@ -44,6 +44,7 @@ export function createCouncilFinalize(
const base = basePath ?? process.cwd()
let promptFileMoved = false
try {
const hexId = randomBytes(COUNCIL_DEFAULTS.ARCHIVE_ID_BYTES).toString("hex")
const safeName = slugify(args.name) || "unnamed"
@@ -144,7 +145,7 @@ export function createCouncilFinalize(
})
}
let promptFileMoved = false
const relPromptFile = args.prompt_file
? await movePromptFile(args.prompt_file, base, absArchiveDir, relArchiveDir).then((result) => {
promptFileMoved = true