Skip to content

fix(agent): follow multiple sessions in one process - #1657

Merged
Atchyut Preetham Pulavarthi (theonly1me) merged 1 commit into
mainfrom
fix/wiz-12474
Oct 9, 2026
Merged

Atchyut Preetham Pulavarthi (theonly1me) merged 1 commit into
mainfrom
fix/wiz-12474

Conversation

@theonly1me

@theonly1me Atchyut Preetham Pulavarthi (theonly1me) commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Overview of Changes

Following 32 sub-sessions with separate CLI processes can exhaust the lead pod's memory. Add one command that follows those sessions in one process.

  • Add agent get --sessions <ids...> --follow, which returns the first completion, failure, cancellation or question.
  • Read snapshots with waitSeconds: 0, one request at a time, and keep the existing session output and exit codes.
  • Keep single-session following and interactive answers on their existing path.
  • Add behavioral tests for completion, questions, failure, cancellation, timeout, duplicate ids, invalid arguments and cleanup.
  • Add a minor package changeset.

Testing

bun run typecheck
bun run lint --max-warnings 0
bun run format:check
bash scripts/check-naming.sh
bun run knip
bun run test
bun run build

All pass locally. The full suite passed 2762 tests with 0 failures. The agent tests passed 62 tests.

  • The new tests failed before implementation because the command could not follow the session list.
  • In a disposable ai-task image with a 3 GiB memory limit, 32 separate CLI processes reached the limit and caused 3 kernel OOM kills. Their total JSON response bodies were 24.9 KB.
  • The combined command used one CLI process for 32 and 50 sessions. Peak container memory was 191 MiB and 199 MiB, with 0 OOM kills.
  • The memory test used a local API server and the arm64 ai-task image. It did not include the lead agent's normal workload.
  • The Platform draft requires the CLI release that contains this command. Hard process enforcement remains follow-up work.

@theonly1me
Atchyut Preetham Pulavarthi (theonly1me) merged commit ab1ec6f into main Oct 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants