@@ -1579,41 +1579,3 @@ it.effect.each([
15791579 } ) ,
15801580 ) ,
15811581) ;
1582-
1583- it . effect ( "keeps each thread's current tab when threads share a provider session" , ( ) =>
1584- Effect . scoped (
1585- Effect . gen ( function * ( ) {
1586- const broker = yield * makeBroker ;
1587- const routed : Array < RoutedRequest > = [ ] ;
1588- const requests = requestsFrom ( yield * broker . connect ( makeHost ( ) , { preferred : true } ) ) ;
1589- yield * Stream . runForEach ( requests , ( request ) => {
1590- routed . push ( request ) ;
1591- return broker . respond ( {
1592- clientId : "client-1" ,
1593- connectionId : request . connectionId ,
1594- requestId : request . requestId ,
1595- ok : true ,
1596- result : { tabId : request . tabId ?? `tab-${ request . threadId } ` } ,
1597- } ) ;
1598- } ) . pipe ( Effect . forkScoped ) ;
1599- yield * Effect . yieldNow ;
1600- // Codex runs every thread of an instance in one provider session.
1601- const otherThread = {
1602- ...scope ,
1603- thread : { ...scope . thread , threadId : ThreadId . make ( "thread-2" ) } ,
1604- } ;
1605-
1606- yield * broker . invoke ( { scope, operation : "open" , input : { } } ) ;
1607- yield * broker . invoke ( { scope : otherThread , operation : "snapshot" , input : { } } ) ;
1608- yield * broker . invoke ( { scope, operation : "snapshot" , input : { } } ) ;
1609-
1610- expect ( routed . map ( ( { threadId, tabId } ) => [ threadId , tabId ] ) ) . toEqual ( [
1611- [ "thread-1" , undefined ] ,
1612- [ "thread-2" , undefined ] ,
1613- [ "thread-1" , "tab-thread-1" ] ,
1614- ] ) ;
1615- // Each thread's agent owns its own tabs and tab budget.
1616- expect ( routed [ 0 ] ! . agentSessionId ) . not . toBe ( routed [ 1 ] ! . agentSessionId ) ;
1617- } ) ,
1618- ) ,
1619- ) ;
0 commit comments