Skip to content

WorkspaceContextMiddleware.onSystemPrompt中的buildWorkspaceSection可能有eventLoop阻塞问题 #2578

Closed

Description

@zjlolife

WorkspaceContextMiddleware onSystemPrompt 是跑在caller线程上的,如果使用weflux的话,那就是跑在eventLoop上了,那么就会有阻塞的问题:
因为onSystemPrompt 里 buildWorkspaceSection 同步读 AGENTS.md/MEMORY.md/KNOWLEDGE.md + 额外文件(本地 filesystem 或远程 redis RemoteFilesystem)

io.agentscope.harness.agent.middleware.WorkspaceContextMiddleware#buildWorkspaceSection

另外但凡涉及到从远程remote store读取的,可能都有阻塞的问题,不知道官方何时能彻底修复。

Activity

  1. rudy2steiner commented on Aug 7, 2026

    @rudy2steiner
    Contributor

    i'll work on it

  2. added
    question
    area/build
    area/core/agent
    area/core/memory
    area/harness
    on Aug 11, 2026
  3. juruoO-o commented on Nov 12, 2026

    @juruoO-o
    Collaborator

    Closing as fixed by #2632 (merged): WorkspaceContextMiddleware.onSystemPrompt no longer assembles workspace context synchronously on the caller (event-loop) thread. Reopen if Netty event-loop blocking still shows up.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildarea/core/agentarea/core/memoryarea/harnessquestion

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions