Skip to content

fix(pool): hung eviction drops the session's [[ws:]] workspace #1556

Closed

Description

@sebastian-hsu

Description

When a session is force-evicted as hung, purge_session_entries() also removes its session_workdirs entry (crates/openab-core/src/acp/pool.rs, added in #1300). The next session for that thread starts in the default working_dir, not the [[ws:...]] workspace.

Steps to Reproduce

  1. Start a session with [[ws:@alias]] ... in a thread.
  2. Let one turn run past prompt_hard_timeout_secs + hung_grace_secs (log: force-evicting hung session … threshold_secs=1920).
  3. Send another message to the thread without a directive (for us: a usercron job with thread_id).
  4. The new agent is spawned with cwd = default working_dir.

Seen twice on 2026-10-01 on 0.10.0-beta.4 with claude-agent-acp.

Expected Behavior

The workspace survives eviction, as documented in docs/workspaces.md ("persists across session suspend/resume and eviction rebuilds") and docs/adr/control-directives.md §3.1. Only an explicit reset should clear it.

I will send a PR.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions