LibreChat/api/server/controllers/agents
Danny Avila 8a0efa95d0 fix: Codex round — deletion/lease window, resume self-capacity, abort-as-aborted, weekly label
Address all 6 findings from Codex review of 912d75bff:

- Exclude the resumed run from capacity checks (P2): reserveScheduledResume discounts
  this occurrence's own started row (isOccurrenceStarted) so a self-active row (from a
  transient pause-bookkeeping failure) doesn't push the global count over the cap and
  block resuming the same occurrence.

- Preserve the lease marker while deleting (P2): markScheduleDeleting no longer unsets
  leaseUntil/leaseBy, so a fire that already reserved a started row can prove
  (holdsLease) it still owns the lease and roll back its own unposted row instead of
  leaving a ghost.

- Treat a live lease as undrained (P2): eraseScheduleIfDrained also refuses to erase
  while a LIVE lease is held (a worker claimed but hasn't reserved yet), so it can't
  erase out from under a worker about to insert a reservation.

- Release own lease after owner-edit supersedes fire (P2): the superseded rollback path
  now releaseLeaseByHolder(leaseBy) since advance() is token-fenced and no-ops after an
  edit — otherwise the edited schedule / Run now reads 'already in progress' until TTL.

- Preserve early-abort jobs as aborted (P2): the createJob->liveness early abort uses
  abortJob (stored 'aborted' -> reconcile 'interrupted') instead of completeJob, whose
  preserved 'complete' the reconciler would map to 'success'.

- Show default weekly schedules as weekly (P3, client): describeCadence renders a
  weekly cadence without daysOfWeek on the server's default weekly day instead of
  falling through to the daily label.
2026-07-22 13:10:39 -04:00
..
__tests__ fix: Codex round 11 — pause recording, resume/abort preserve, Redis preserve TTL 2026-07-21 23:56:03 -04:00
callbacks.js 🙊 refactor: Clarify Ask Question Schema Errors and Retry Guidance (#14279) 2026-07-15 11:06:29 -04:00
client.js fix: address deep review — indexes, redis metadata, capacity, crash-retry, cascade (14 findings) 2026-07-21 20:13:15 -04:00
client.test.js 🪝 feat: Human-in-the-Loop Runtime - Tool Approval + Ask-User-Question (Slice B) (#13942) 2026-06-29 16:56:41 -04:00
errors.js 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-21 14:28:53 -04:00
filterAuthorizedTools.spec.js 🧠 feat: Add Memory as an Agent Capability with Inline Tools and Ephemeral Badge (#13869) 2026-06-24 17:14:13 -04:00
openai.js 🧵 feat: Background Tool Calls for Agents & Model Specs (#14197) 2026-07-13 12:51:36 -04:00
recordCollectedUsage.spec.js 🪢 chore: Consolidate Pricing and Tx Imports After tx.js Module Removal (#12086) 2026-03-21 14:28:53 -04:00
request.js fix: Codex round — deletion/lease window, resume self-capacity, abort-as-aborted, weekly label 2026-07-22 13:10:39 -04:00
responses.js 🧵 feat: Background Tool Calls for Agents & Model Specs (#14197) 2026-07-13 12:51:36 -04:00
resume.js fix: Codex round — resume capacity/existence, skip guard, topology signal, loopback re-fence 2026-07-22 10:44:20 -04:00
steer.js 🧭 feat: Mid-Run Steering and Queued Messages for Agent Runs (#14220) 2026-07-14 10:11:10 -04:00
v1.js 🧊 fix: Include Conversation Starters in Agent View and List Responses (#14142) 2026-07-08 12:54:54 -04:00
v1.spec.js 🧊 fix: Include Conversation Starters in Agent View and List Responses (#14142) 2026-07-08 12:54:54 -04:00