Background task completion does not resume agent in idle sessions
Environment
- pi-web version:
0.9.0
- timeout:
0
Problem
When a session enters the idle state while one or more background tasks are still running, completion of those background tasks does not wake the session or resume the agent.
This is not caused by the session exceeding its timeout. I have explicitly configured:
The session is still valid and has not been terminated due to timeout.
However, after the background task finishes, the session remains idle and the agent does not continue execution until a user manually sends another message.
Reproduction
- Start an agent session.
- Let the agent launch one or more background tasks.
- The agent finishes its current turn and the session enters the
idle state.
- Wait for the background task to complete.
- Observe that the session remains
idle.
- The agent does not automatically resume.
- Send any manual user message, and the agent can continue normally.
Actual behavior
Agent starts background task
↓
Agent becomes idle
↓
Background task completes
↓
Session stays idle
↓
Agent does not continue
A manual user message is required to wake the session and resume agent execution.
Expected behavior
If an idle session still has background tasks associated with it, completion of those tasks should trigger a wake-up/resume event for the session.
Agent starts background task
↓
Agent becomes idle
↓
Background task completes
↓
Session is awakened
↓
Agent resumes and processes the result
In other words, an idle session should still be able to receive background-task completion events and use them to resume agent execution, as long as the session has not actually timed out or been terminated.
Background task completion does not resume agent in idle sessions
Environment
0.9.00Problem
When a session enters the idle state while one or more background tasks are still running, completion of those background tasks does not wake the session or resume the agent.
This is not caused by the session exceeding its timeout. I have explicitly configured:
The session is still valid and has not been terminated due to timeout.
However, after the background task finishes, the session remains idle and the agent does not continue execution until a user manually sends another message.
Reproduction
idlestate.idle.Actual behavior
A manual user message is required to wake the session and resume agent execution.
Expected behavior
If an idle session still has background tasks associated with it, completion of those tasks should trigger a wake-up/resume event for the session.
In other words, an
idlesession should still be able to receive background-task completion events and use them to resume agent execution, as long as the session has not actually timed out or been terminated.