kimi-code/docs/zh/configuration
Haozhe e49b3b8777
fix(agent-core-v2): harden wire restore and background task lifecycle (#1635)
* fix(agent-core-v2): fix wire migration rewrite race and reject unversioned logs (8 files)

- await the migration rewrite in wireRecordService.restore() so restore only resolves once the migrated log is durable and rewrite failures surface
- serialize AppendLogStore.rewrite() behind the log flush so appends arriving during the whole-file replace land after the new content
- reject wire logs missing the metadata envelope (missingWireMetadataError) in restore, session fork, and agent create instead of fabricating a current-version envelope over legacy records

* fix(agent-core-v2): stop background tasks on session close (10 files)

- add IAgentTaskService.stopAllOnExit: suppress terminal notifications, then SIGTERM → grace → SIGKILL for every active task (v1 stopBackgroundTasksOnExit parity, gated by keepAliveOnExit)
- call stopAllOnExit from agentLifecycle.remove before scope disposal, and abort live tasks in AgentTaskService.dispose as a last resort for disposal paths that bypass the graceful close
- honor [task] killGracePeriodMs in the stop grace window and bind the v1 KIMI_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT env override for keepAliveOnExit

* fix(agent-core-v2): root task persistence at the owning agent's scope

- persist task records under <sessionScope>/agents/<agentId>/tasks/ (v1's
  per-agent layout) so tasks written by older versions are found on resume
- stop one agent's restore from loading, marking lost, or re-notifying
  another agent's tasks
- add a per-agent isolation test covering loadFromDisk + reconcile

* fix(agent-core-v2): address task lifecycle review findings

* fix(agent-core-v2): preserve queued appends across rewrites

* test(agent-core-v2): cover rewrite cutover flush

* fix(agent-core-v2): surface append durability failures

* fix(agent-core-v2): retire released append log buffers

* fix(agent-core-v2): preserve session-level task records

* fix(agent-core-v2): harden append log cutover recovery

* fix(agent-core-v2): suppress only background exit notifications

---------

Co-authored-by: qer <wbxl2000@outlook.com>
2026-07-14 10:02:24 +08:00
..
config-files.md fix(agent-core-v2): harden wire restore and background task lifecycle (#1635) 2026-07-14 10:02:24 +08:00
data-locations.md feat(update): roll out automatic updates in staged batches via CDN manifest (#691) 2026-06-15 16:52:44 +08:00
env-vars.md docs: update subagent timeout docs for configurable timeout_ms (#1582) 2026-07-12 21:09:17 +08:00
overrides.md feat(cli): add -c as shorthand for --continue (#999) 2026-06-23 13:53:31 +08:00
providers.md fix(provider): honor base_url for google-genai and vertexai providers (#1269) 2026-07-01 19:33:35 +08:00