Skip to content

fix(agent): stop passive mode when idle - #114

Closed
HelloAnner wants to merge 1 commit into
VirtualBeingsResearch:mainfrom
HelloAnner:fix/passive-mode-rest
Closed

fix(agent): stop passive mode when idle#114
HelloAnner wants to merge 1 commit into
VirtualBeingsResearch:mainfrom
HelloAnner:fix/passive-mode-rest

Conversation

@HelloAnner

Copy link
Copy Markdown
Collaborator

Summary

  • make passive mode wait before calling the model when startup or restored context has no pending work
  • suppress autonomous heartbeat injection while passive mode is enabled
  • return to passive rest immediately after an event ends without tool calls
  • preserve pending tool-result continuation before resting

Validation

  • uv run --frozen python scripts/check_version.py
  • uv run --frozen ruff check src tests scripts apps/explore-lab/backend
  • uv run --frozen mypy src
  • uv run --frozen pytest (1450 passed)

Risks and compatibility

  • Behavior changes only when agent.passive_mode=true.
  • Active mode heartbeat and timed rest behavior are unchanged.
  • Passive tool chains still continue while a tool result needs model processing, then rest after completion.
  • This reduces unintended background model usage; it does not change provider, API, storage, or communication formats.

Checks not run

  • Rust and frontend checks were not run because this change only touches the Python agent loop and unit tests.

@Zoupers

Zoupers commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

初步想了一下,这个好像是会影响模型的启动的,例如我们现在刚刚初始化,配置完模型,然后系统重启了
这个时候模型相当于首次启动,其short_term应该为空,那这个时候好像就会直接停住,而不是模型自己探索,这个是这个PR所期望的行为嘛?

@HelloAnner

Copy link
Copy Markdown
Collaborator Author

等待批复 ing

@HelloAnner HelloAnner closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants