Commit 8f71c77
committed
fix: limit parallel browser instances and reject concurrent persistent sessions
- Persistent/existing mode: throw error when instance is already in-use,
instructing the model to run browser tasks sequentially. This prevents
Chrome profile lock conflicts from concurrent --userDataDir usage.
- Isolated mode: allow parallel instances up to MAX_PARALLEL_INSTANCES (5).
Throw when the limit is exceeded to prevent resource exhaustion.
- Update integration test to use isolated mode for concurrent browser agents.
- Add 3 new unit tests for persistent/existing rejection and max limit.1 parent 40c5709 commit 8f71c77
4 files changed
Lines changed: 298 additions & 191 deletions
File tree
- integration-tests
- packages/core/src/agents/browser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
325 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
0 commit comments