Skip to content

fix: protect orchestrators from session cleanup#453

Merged
harsh-batheja merged 3 commits intomainfrom
session/ao-82
Mar 13, 2026
Merged

fix: protect orchestrators from session cleanup#453
harsh-batheja merged 3 commits intomainfrom
session/ao-82

Conversation

@harsh-batheja
Copy link
Collaborator

Summary

  • harden core cleanup selection so canonical orchestrator sessions are always skipped, even when stale worker-like metadata or archived OpenCode mappings exist
  • filter orchestrator entries out of ao session cleanup output and counts so worker cleanup stays visible without surfacing orchestrator cleanups
  • add regression coverage for active and archived orchestrator metadata, dry-run/output filtering, and cross-project prefixed cleanup results

Verification

  • corepack pnpm --filter @composio/ao-core test -- session-manager.test.ts
  • corepack pnpm --filter @composio/ao-cli test -- session.test.ts session-utils.test.ts
  • corepack pnpm --filter @composio/ao-core typecheck && corepack pnpm --filter @composio/ao-cli typecheck
  • corepack pnpm -r --filter @composio/ao-cli... build

harsh-batheja and others added 2 commits March 13, 2026 09:13
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@harsh-batheja
Copy link
Collaborator Author

Addressed Cursor Bugbot feedback in commit e6bc6a8 by removing the redundant/unreachable duplicate orchestrator cleanup guard branch in packages/core/src/session-manager.ts. Re-ran core verification and pushed; all PR checks are now green.

@harsh-batheja harsh-batheja merged commit 1d960fe into main Mar 13, 2026
10 checks passed
@harsh-batheja harsh-batheja deleted the session/ao-82 branch March 13, 2026 04:09
zvictor pushed a commit to skadaai/agent-orchestrator that referenced this pull request Mar 16, 2026
* fix: harden orchestrator cleanup selection

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: suppress orchestrators in cleanup command output

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: remove unreachable cleanup guard branch

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

---------

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.

1 participant