fix(subagent): raise maintenance delegate token ceilings for dense archives - #97
Closed
Shimmernight wants to merge 1 commit into
Closed
fix(subagent): raise maintenance delegate token ceilings for dense archives#97Shimmernight wants to merge 1 commit into
Shimmernight wants to merge 1 commit into
Conversation
…chives Maintenance delegations (migration/compaction/document-archive) were capped at 8192 and metadata-maintenance at 4096 completion tokens. Reasoning models spend most of that budget on analysis before emitting the small structured result, so the whole capacity-overflow operation aborted with stopReason=max-tokens (dense CJK archives, see omdsh-dev#70). Raise the ceilings to 32768/16384. The structured output stays small; the caps only bounded the analysis budget, which is the part that needs headroom. Fixes-class change: no new config surface, no issue gate required. Co-Authored-By: none
Collaborator
|
感谢提交。最新 main 已通过 #102 支持配置 Runtime 迁移和压缩的 token 预算,容量归档也已有确定性写入及模型路由失败回退,因此不再采用统一提高固定上限的方案,本次关闭此 PR。 文档归档和元数据维护仍使用固定预算。如果这些路径在最新 main 上仍出现 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When runtime
MEMORY.mdis at capacity, everymnemon_runtime_memoryadd delegates to maintenance workers (archive routing / local compaction / metadata sampling). Those workers are capped at 8192 (and 4096 for metadata-maintenance) completion tokens. Reasoning models spend most of that budget on analysis before emitting the small structured result, so the worker stops withstopReason=max-tokensand the whole tool call aborts — with zero writes.Reproducible with dense CJK content. Reported upstream as #70 (still fails on 0.3.0) and #83/#85 (same symptom, auto-closed for form issues).
Root cause
src/subagent.ts— static per-op ceilings override the host-resolved token budget:Fix
Raise the ceilings to 32768 / 16384. The structured output of these workers is still small; the caps only bounded the analysis budget, which is the part that needs headroom. Fixes-class change: no new config surface, no issue gate required.
src/subagent.ts: 8_192 → 32_768, 4_096 → 16_384tests/subagent.spec.ts: update the pinned expectations (metadata 4_096 → 16_384; migration/compaction/merge 8_192 → 32_768)Verification
pnpm exec tsc --noEmit— cleanpnpm exec vitest run tests/subagent.spec.ts— 42/42 passingNotes
The static ceilings remain finite. #70's deterministic bulk-import direction would remove the LLM dependency entirely; this PR is a targeted stopgap until that lands.