[PR #1615] [MERGED] fix(plugins): improve session idle event #9994

Closed
opened 2026-02-16 18:14:31 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1615
Author: @timoclsn
Created: 8/5/2025
Status: Merged
Merged: 8/5/2025
Merged by: @adamdotdevin

Base: devHead: improve-session-idle-event


📝 Commits (2)

  • 0966133 fix(plugins): dont fire session idle event after auto compacting
  • 54c67cb fix(session): await before checking and firing idle event after auto-compacting

📊 Changes

1 file changed (+17 additions, -4 deletions)

View changed files

📝 packages/opencode/src/session/index.ts (+17 -4)

📄 Description

This improves the session idle event in the following ways:

  • doesn't fire on the auto-compact feature (as this basically initializes a new chat)
  • doesn't fire for child sessions (e.g. that are spawned via the task tool)

I think both were unexpected, e.g., when sending notifications for finished agent runs.

In the future, we can add specific events for those two occasions if needed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1615 **Author:** [@timoclsn](https://github.com/timoclsn) **Created:** 8/5/2025 **Status:** ✅ Merged **Merged:** 8/5/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `improve-session-idle-event` --- ### 📝 Commits (2) - [`0966133`](https://github.com/anomalyco/opencode/commit/0966133bdd018fc1c46edf6d0d5ff342a68cdf47) fix(plugins): dont fire session idle event after auto compacting - [`54c67cb`](https://github.com/anomalyco/opencode/commit/54c67cb45e0ff20a21fac9b92fd1b7494d256e69) fix(session): await before checking and firing idle event after auto-compacting ### 📊 Changes **1 file changed** (+17 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/session/index.ts` (+17 -4) </details> ### 📄 Description This improves the session idle event in the following ways: - doesn't fire on the auto-compact feature (as this basically initializes a new chat) - doesn't fire for child sessions (e.g. that are spawned via the task tool) I think both were unexpected, e.g., when sending notifications for finished agent runs. In the future, we can add specific events for those two occasions if needed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:31 -05:00
yindo closed this issue 2026-02-16 18:14:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9994