Skip to content

P2: maybe_compact() 消息替换存在索引对齐 bug #9

Description

@ULookup

问题

AgentLoop::maybe_compact() 将摘要插入位置 0,然后从位置 1 开始删除 replaced.size() 条消息,假设被替换的消息恰好对应 session_history_ 的前缀。但实际上 comp_result.replaced 是从 compact_history() 内部计算的区间,如果此前已做过其他 compact,索引会偏移。

涉及文件

  • libs/loop/src/agent_loop.cpp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority/P2Nice to havesubsystem/loopAgent loop and sub-agents

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions