Circumbinary planets are planets that orbit both stars of a central binary. They were once confined to science fiction, but the discovery of Kepler-16 b (ref. 1) paved the way for the detection of 14 transiting planets in 12 binary systems by the Kepler2 and Transiting Exoplanet Survey Satellite (TESS)3 missions. Of the 12 transiting circumbinary planet systems discovered so far, only 1 hosts multiple circumbinary planets: Kepler-47. Kepler-47 b, d and c have orbital periods of 49.5, 187.4 and 303.2 days (d) respectively4, with Kepler-47 c’s orbit placing it within the system’s habitable zone. Planet-forming disks around binaries are harsh environments for planet formation to take place in, and circumbinary planet discoveries provide insights into the formation and migration mechanisms at play in these unique environments5,6,7,8,9.

Of the 14 confirmed transiting circumbinary planets, there are only significant mass detections (different from zero at >2σ) for six of them. These are: Kepler-34 b and Kepler-35 b (ref. 10), TIC 17290098 b (ref. 11), Kepler-16 b (refs. 1,12), Kepler-47 c and Kepler-47 d (ref. 4), the masses of which were determined from binary eclipse timing variations (ETVs) alone. For the remaining eight circumbinary planets only upper limits can be placed on their masses, because the ETVs are on the order of only seconds or minutes, and hence difficult to measure. Their masses could therefore be much lower than expected and reveal several inflated objects, representing ideal targets for atmospheric transmission follow-up observations13. To correctly characterize these planets, accurate masses are required.

To increase the number of known circumbinary planets, and to provide accurate masses for systems discovered with the transit method, we initiated a radial-velocity observing survey dedicated to circumbinary planet detection called binaries escorted by orbiting planets (BEBOP)14. Systems followed by BEBOP are on average four visual magnitudes brighter than circumbinary systems identified with Kepler14. Radial velocities are less restricted to the edge-on and shorter orbital periods found by the transit method15. Despite initial challenges in bringing radial-velocity precision for binaries down to values where planets can be detected16, recent results have produced an independent detection of Kepler-16 b with a precision of 1.5 m s−1, providing a planetary mass in agreement with ETV measurements12.

The first circumbinary planet discovered by NASA’s TESS3 mission was TOI-1338 b (ref. 17). TOI-1338 is a low-mass eclipsing binary system that consists of a 1.13 solar mass (M) F8-type primary star with a visual magnitude of V = 11.7 (refs. 17,18) and a 0.31 M M-dwarf companion. This system was already being monitored with radial velocities with HARPS19 as part of the BEBOP project, where the target was known as EBLM J0608-59 (refs. 14,18). Radial-velocity data available at the time were unable to detect any trace of TOI-1338 b, the Saturn-sized planet announced by Kostov et al.17. To constrain the mass of this planet, we used the ESPRESSO spectrograph at the Very Large Telescope20. We continued to observe with HARPS intermittently to combine both datasets more easily, and to mitigate observatory closures caused by the COVID-19 pandemic. In total, we collected 123 ESPRESSO spectra and 61 HARPS spectra over a period of 1,472 d.


Analysis of the radial velocities

We analysed our radial-velocity data with the diffusive nested sampler implemented in kima version 4.0.2 (ref. 21), slightly adapted for the purpose of a circumbinary system. We included non-Keplerian effects such as gravitational redshift, light time travel22,23,24 and tidal distortion25. We also directly fitted for the most important of the Newtonian perturbations (the apsidal precession), which we parameterized using a free parameter, \({\dot{\omega }}_{{{{\rm{bin}}}}}\). Further details can be found in the Methods, but we note here that one particularly useful feature of kima is that the number of planetary signals in the data can be included as a free parameter in the analysis. The number of planets detected is determined from the ratio of evidence between models with different numbers of planets. The radial-velocity data favour a one-planet model over a zero-planet model with a ratio of probability (Bayes factor) >29,000 (where >150 is the typical threshold for detection). The same analysis provided a Bayes factor of only 1.4 in favour of a two-planet model over a one-planet model, far below the detection threshold. Therefore, only one planetary signal was formally detected in our data.

Figure 1 depicts a histogram of the posterior samples obtained from our analysis. There are two peaks, one at the binary orbital period of 14.6 d, and a single additional excess at 215.5 d. As this periodicity does not correspond to the 95 d period of the transiting planet17, and an outer orbit substantially improves the fit, we concluded that the detected planetary signal is probably that of an additional, outer circumbinary planet within the system. We therefore gave the system the name BEBOP-1, making it the first entry in the BEBOP catalogue for circumbinary planets detected with radial velocities; the new signal was named BEBOP-1 c. The name BEBOP is recognized as an official designation by the International Astronomical Union, and indicates the availability of high-precision radial-velocity measurements on the target and their ability to detect a planet. We do not refer to TOI-1338 b as BEBOP-1 b as we are not yet able to detect its signal using radial-velocity measurements. Figure 2 shows a phase-folded plot of the radial-velocity variation caused by BEBOP-1 c, with a semi-amplitude Kc = 5.6 ± 1.0 m s−1, corresponding to a minimum mass \({m}_{{{{\rm{c}}}}}\sin {i}_{{{{\rm{c}}}}}=0.217\pm 0.035\,{{{M}}}_{{{{\rm{Jup}}}}}\), where ic is the orbital inclination of planet c and MJup is the mass of Jupiter. The binary’s apsidal precession was found to be marginally different from zero (\({\dot{\omega }}_{{{{\rm{bin}}}}}=66.{0}_{-54.7}^{+65.0}\,{{{\rm{arcsec}\,{\rm{yr}}}^{-1}}}\)). The parameters of the binary and planetary orbits obtained from our model fit to the radial velocities are available in Table 1, while Fig. 3 provides an overview of the BEBOP-1 circumbinary planet system. We calculated the true inclusion probability26,27 of our posterior samples, which also provided a clear >99.9% probability of the presence of a planetary signal at a period of 215.5 d. Further details can be found in the Methods.

Fig. 1: Histogram periodogram of posterior samples obtained from a kima run on the BEBOP-1 system.
figure 1

The 14.6 d binary period and 215.5 d period of BEBOP-1 c can be clearly identified (highlighted in red and blue, respectively). The inset plots show close-ups of these two peaks, where δPbin is the period of the binary orbit, and Pc is the period of BEBOP-1 c’s orbit. No notable peak from the transiting planet TOI-1338 b (marked with period Pb) can be seen in these posterior samples.

Fig. 2: Phased Keplerian radial-velocity models of the BEBOP-1 c signal.
figure 2

Models of BEBOP-1 c after removing the binary signal are shown with ESPRESSO (blue diamonds) and HARPS (orange squares) data along with their nominal error bars. The associated residuals are displayed in the bottom panel. O, observed; C, calculated. RV data are binned by 0.1 phase units (~21.6 d) weighted by their uncertainties σi and illustrated by the circular data points, with their associated errors given by \(\sqrt{\frac{1}{\sum 1{\sigma }_{i}^{2}}}\). The red Keplerian models in the top panel are based on 500 randomly drawn posterior samples from a kima run, shaded from the 50th to 99th percentiles. The shaded regions display the repeating signal.

Table 1 BEBOP-1 system orbital parameters from our analysis of the ESPRESSO and HARPS radial velocities after removing outliers
Fig. 3: Overview of the BEBOP-1 system.
figure 3

The BEBOP-1 system is shown along with the extent of the system’s habitable zone (HZ) calculated using the Multiple Star HZ website95. The conservative habitable zone is shown by the dark green region, while the optimistic habitable zone is shown by the light green region. The binary stars are marked by the blue star symbols in the centre. The red shaded region denotes the instability region surrounding the binary stars as described by Holman and Wiegert92. BEBOP-1 c’s orbit is shown by the red orbit models, based on 500 randomly drawn posterior samples from a kima run, shaded from the 50th to 99th percentiles. TOI-1338 b’s orbit is shown by the yellow models, and is also based on 500 random samples drawn from the posterior in its discovery paper17.

Verification of stellar activity

Stellar magnetic activity can produce periodic modulations in radial velocity over a wide range of timescales, sometimes mimicking a planetary companion28. To verify whether this is the case for the BEBOP-1 c signal, we searched for periodic signals in five spectroscopic activity indices (see Methods for details).

Stellar activity has been shown to affect most, if not all, of these five indices at once29. In our case, only two show any signal. Furthermore, at shorter periods neither Ca ii H+K nor Hα indices produced any significant peak. Combining the stellar radius and projected rotational velocity of BEBOP-1, a rotation period of 19 ± 3 d has been reported17. We did not find any statistically significant signal at the estimated rotation period.

Our analysis of activity indices ruled out any association between the 215 d radial-velocity variation and stellar activity, supporting the hypothesis of BEBOP-1 c’s planetary nature. Further details are provided in the Methods and Supplementary Figs. 1–11.


A visual inspection of TESS light curves showed no transit of BEBOP-1 c; however, owing to orbital circulation, transits are expected to occur in due time. Circumbinary orbits exhibit nodal precession, which changes the orientation of a circumbinary planet’s orbital plane with respect to both the binary and the observer. This makes a planet change from a transiting to a non-transiting configuration15,30 as has been seen in a few systems31,32. Using an analytic criterion33,34, we found that BEBOP-1 c is guaranteed to eventually transit—mainly because the binary is so well-aligned with our line of sight (Ibin = 89.658°) combined with the relatively large size of the primary star (RA = 1.299 R). While BEBOP-1 c will eventually transit, we are unable to predict when and how frequently. Its precession period is of order 119 years, during which time there will be two periods of transitability of a duration that depends on BEBOP-1 c’s orbital inclination.

To verify the orbital parameters of our fit we carried out a global stability analysis of the system. This stability analysis showed that the system is stable when the two circumbinary planets are in nearly circular and coplanar orbits (Methods). More precisely, the eccentricities of both planets cannot exceed 0.1, in agreement with the best-fit solution (Table 1); ic is not constrained by the radial velocities, but according to orbital stability arguments it cannot be higher than 40° with respect to the orbital plane of the binary, corresponding to a maximum mass of mmax,c = 0.28 MJup.

The influence of the central binary means that circumbinary planets have unique formation pathways, and it is worth noting that the system discussed in this Article is only the second system known to host multiple planets. Hydrodynamical simulations have shown that the preference for observed circumbinary planets to be located close to the stability boundary can be explained by formation at large distances in circumbinary disks, followed by inward migration and stalling at the edge of the inner cavities formed by the central binaries35,36,37. We utilized a purpose-built simulation code to study the formation of circumbinary planets as a means of understanding plausible formation scenarios for the BEBOP-1 system. Details of this code are available in the Methods. The model includes the N-body integrator MERCURY6, adapted to include a central binary system38,39, and it incorporates prescriptions for a viscous circumbinary disk that includes the effects of an eccentric, precessing central cavity and photoevaporative winds40, pebble accretion onto planetary seeds41, planet migration42 and gas accretion onto growing planets43,44. Our suite of simulations produced numerous systems that were qualitatively similar to BEBOP-1 (see Supplementary Information), with TOI-1338 b and BEBOP-1 c analogues landing on stable orbits at their observed locations.

With no detection of the 95 d planet in our data, the best we could do was to calculate a detection limit for this period region, which can be seen in Fig. 4. We found that TOI-1338 b has a mass of <21.8 M with 99% confidence. This is compatible with the 33 ± 20 M from ETVs17; Fig. 5 shows a radius versus mass plot for transiting circumbinary planets and planets orbiting single stars. Combining this mass with a planetary radius of ~6.9 R (ref. 17), TOI-1338 b has a maximum mean planetary density of <0.36 g cm−3. This allowed us to calculate the transmission spectroscopy metric13 for planet b using the upper limit on the mass (<21.8 M); this yielded a minimum value of >39 (Methods). Of the now 15 known circumbinary exoplanets, TOI-1338 b is the only one for which JWST transmission spectroscopy can currently be pursued. If we are to unravel the mysteries of circumbinary Tatooine-like exo-atmospheres, the BEBOP-1 system may provide a new hope.

Fig. 4: Detection limits for additional undetected planetary signals in the BEBOP-1 radial-velocity data.
figure 4

Hexbin plot denoting the density of ~100,000 posterior samples obtained from four separate kima runs on BEBOP-1 radial-velocity data with Np fixed to 1. The red line shows the calculated 99% detection limit, with its associated error denoted by the lines thickness. The letters mark in orange circles mark the positions of the detected planet BEBOP-1 c and planet TOI-1338 b, which is not detected in RV data alone. The orange line shows the detection limit on samples with eccentricity e < 0.1 (the upper limit on TOI-1338 b’s eccentricity17).

Fig. 5: Radius versus Mass plot of all transiting circumbinary planets and planets orbiting single stars.
figure 5

For the single-star planets we restricted the sample to planets with mass and radius percentage errors of less than 20%. For the circumbinary planets we show all transiting planets, even if the mass is only constrained by an upper limit (triangle symbol). Error bars show 1σ. TOI-1338 b is highlighted in red, with one of the lowest densities known. The newly discovered BEBOP-1 c is not plotted as it does not transit. These data are publicly available on the NASA Exoplanet Archive96.


Collected observations

BEBOP-1 was selected for the BEBOP programme14 from a large sample of low-mass eclipsing binaries identified by the EBLM project18 under the name EBLM J0608-59. Those binaries were detected as part of the Wide Angle Search for Planets, as candidate transiting planets that were later shown using radial velocities to be ‘false positive’ eclipsing binaries. To be part of the EBLM and BEBOP sample, a system needs to be a single-lined eclipsing binary. For identification and selection, the southern sample exclusively used the CORALIE spectrograph (resolution R ≈ 45,000; mounted on the 1.2 m Euler Swiss telescope at La Silla, Chile). BEBOP-1 was first observed as part of the EBLM project in 2009.

The BEBOP sample represents a subsample of the EBLM sample, for which the binaries were selected to optimize its planet-finding capability. The main discriminator is the obtained radial-velocity precision, which is typically a function of magnitude. There is also a bias towards wider (5 d) binaries, as rapid rotation due to tidal locking broadens spectral lines and reduces precision. Fortunately, the Kepler results in fact show a dearth of planets transiting the tightest binaries45. We also progressively removed binaries where a long-term radial-velocity trend revealed the presence of a third star, which is believed to have a detrimental impact on planet occurrence45. Finally, systems were also removed on the basis of simple activity indicators such as the line bisector28. Targets within the BEBOP sample received longer exposures than the rest of the EBLM sample, to improve precision. BEBOP-1 was first observed as part of the BEBOP project in 2014. Further details of the selection process can be found in ref. 14.

There are 55 radial velocities obtained with CORALIE that were not used in this Article. Their typical uncertainty is 25 m s−1, much higher than the signal we identified. Some of these radial velocities were used to determine the spin–orbit angle of the binary46.


HARPS is a high-resolution, high-precision échelle spectrograph built for the detection of exoplanets47. It has a resolution R ≈ 100,000 and typically achieves a long-term stability under 1 m s−1. It is mounted on the European Southern Observatory (ESO) 3.6 m telescope at La Silla, Chile.

The southern BEBOP sample, including BEBOP-1 (under the name J0608-59), was observed by HARPS under two ESO large observing programmes (programme IDs 1101.C-0721 and 106.212H; PI A.H.M.J.T.). Between 2018 April 8 and 2022 April 18 a total of 61 spectra were obtained for BEBOP-1. Typical exposure times of 1,800 s were obtained, with a median radial-velocity precision of 5.73 m s−1.

HARPS data were reduced with the HARPS Data Reduction Software (DRS) version 3.5 (which is hosted at the Observatory of Geneva). Descriptions of how the DRS works can be found in ref. 48 and in ref. 49. Spectra were correlated using a weighted numerical mask that matched the spectral type of the target producing a cross-correlation function. A Gaussian function was fitted to the cross-correlation function to find the mean radial velocity.

DRS version 3.5 is not very different from version 3.0.0 held by the European Southern Observatory (, but it allowed us to recorrelate the spectra with our own specifications. The standard DRS was built to study single, slowly rotating stars. It assumes two quantities: a common mean radial velocity for all spectra of a given system, and a correlation window of 30 km s−1 on either side of that mean velocity. In the case of binaries, the velocity changes according to the binary phase. In addition, some of the BEBOP sample targets rotate fast enough that a 30 km s−1 window is not sufficient. Using version 3.5 allowed us to centre the correlation window to the observed velocity at each epoch, thus ensuring the same set of absorption lines were used to produce the radial velocities, epoch after epoch. For BEBOP-1 we used the standard 30 km s−1 correlation window and a G2 mask to produce the cross-correlation window. The reduction software provided the radial velocity, its uncertainty (determined from photon noise and the line width), the line width (full-width at half-maximum (FWHM)) and the span of the bisector slope (Bis_Span) and automatically produced corrections to the barycentre of the Solar System.

All HARPS data are available at the ESO public archive ( by searching for EBLM J0608-59, and can be found in Supplementary Table 2.


Following the discovery of TOI-1338 b (ref. 17) 20 radial-velocity measurements were obtained in 2019 with the ESPRESSO spectrograph located in Paranal, Chile,20 in an attempt to confirm the detection of the planet and more accurately constrain its mass (programme ID 103.2024; PI A.H.M.J.T.). Exposure times were typically 900 s in duration and yielded a median precision of 2.83 m s−1. These data, combined with previously obtained HARPS spectra, yielded no detection of TOI-1338 b, but hinted at the presence of an outer companion planet with an orbital period of ~200 d. To confirm this candidate planet and to attempt to detect the inner transiting planet, a further 103 ESPRESSO spectra were obtained with exposure times of 900 s, yielding a median precision of 2.63 m s−1 (programme ID 106.216B; PI M.R.S.). Of these 103 measurements, 3 were obtained during the primary eclipse of the binary and 1 during the transit of planet b. These four observations have been discarded from our analysis as they were affected by the Rossiter–McLaughlin effect, which we did not model here50,51.

In our radial-velocity analysis, we fitted for an offset between ESPRESSO data obtained in 2019 and those obtained in 2021, post COVID closures. This 4.6 m s−1 offset, although small, was introduced by calibration lamp changes during the COVID closure of telescopes in 202052. Our 2019 dataset was obtained after the fibre change on the instrument in 2019. Without accounting for this offset, the planetary signal was still detected in the data. The COVID closures of both the La Silla and Paranal observatories delayed the collection of data on this system and consequently the discovery of this planet by a year. Complete phase coverage of BEBOP-1 c’s orbit was finally achieved when the final data points were collected in March 2022.

ESPRESSO data were reduced using version 2.3.3 of the ESPRESSO pipeline (publicly available at ESO) with a procedure similar to that used for HARPS, but adapted to ESPRESSO. Each cross-correlation function was obtained with a G2 template spectra, with a step size of 0.5 km s−1, and a 300 km s−1 window centred on the radial velocity of the binary. To summarize, we obtained 123 ESPRESSO observations in total, with 20 observations in ESPRESSO 2019, and 103 in ESPRESSO 2021/2022. The total timespan of the HARPS and ESPRESSO combined is 1,472 d.

All ESPRESSO data are available at the ESO public archive by searching for J0608-59. All radial-velocity data used in our analysis can be found in Supplementary Tables 24.


BEBOP-1 was a target for the radial-velocity survey before the launch of TESS. It was then later found to contain a 95 d transiting planet (TOI-1338 b), based on four sectors of TESS data (three in short cadence, 120 s). More data have been taken in the years since. These data are mentioned here for completeness, but we did not include them in the analysis: BEBOP-1 c is an independent radial-velocity discovery.

Outlier treatment

Outliers were identified using two methods. The first (method 1) involved a priori finding outliers in the span of the bisector slope (Bis_Span, a measure of line shape28) and FWHM, and excluding these data. The radial-velocity analysis in this Article used this method. The second method used a Student’s t distribution to account for outliers as part of the sampling process (for example, ref. 53); we used this to check the results from method 1.

Preliminary outliers where the wrong star was observed or the observations occurred during an eclipse or planetary transit were removed first. The following methods to deal with outliers were then applied to the remaining data.

For the a priori removal, each set of points was fitted as a mixture model with inlier and outlier populations, following the method described by Hogg et al.54. For both FWHM and Bis_Span, the inlier model was simply a constant with a small scatter allowed in addition to the uncertainties (which were taken as double the radial-velocity uncertainty). The outlier model also fitted a constant, but with a very wide population scatter.

We used PyMC355 to fit a mean and scatter for both the inlier and outlier distributions, as well as a parameter f for the proportion of points that are outliers; the prior on f was a β[1.5, 9] distribution favouring a low proportion of outliers. These parameters were then used to calculate the probability of the ith point being an outlier for each posterior using the following equation:


where Li,out and Li,in are the likelihoods for the ith point in the respective outlier and inlier distributions.

The power of this method lies in removing the human factor from outlier identification, and not having to resort to sigma-clipping, which does not usually consider measurement uncertainties. A total of 17 outliers were identified this way.

For the Student’s t method, we ran the fits on the dataset accounting for outliers using a Student’s t distribution. Outliers in terms of radial velocity could then be directly identified, rather than relying on the Bis_Span and FWHM indicators used in method 1. This method identified 6 outliers, of which 3 were shared with the 17 outliers identified in method 1; the 3 points were particularly strong outliers in the Student’s t analysis.

Importantly, the resulting detection of BEBOP-1 c and non-detection of TOI-1338 b were not affected by the method of dealing with outliers, and all the parameters from the Student’s t fit were consistent with those found removing the outliers a priori.

In summary, three outliers were identified in the HARPS data in terms of the FWHM, one of which was also identified using Bis_Span and is such a strong outlier that it is suspected that the wrong star was observed. One outlier was identified in the ESPRESSO 2019 data using the FWHM, and 13 outliers were identified in the ESPRESSO 2021/2022 data using the FWHM (two of which were also identified in Bis_Span). Data points identified as outliers are flagged in Supplementary Tables 24. We denoted outliers, excluded from the analysis, with the following flags: Wrong star W, Bis_Span B, FWHM F, During binary transit R and during planetary transit P.

Modelling of the data


For the radial-velocity analysis we used the kima package21, which models radial-velocity data with a sum of Keplerian functions from Np orbiting planets, and estimates the posterior distributions for each of the orbital parameters.

To sample the posterior distribution kima uses a diffusive nested sampling approach56. This provides kima with estimates on the evidence for each model, allowing for model comparison57,58. This model comparison can then be used to compare the ratio of evidence between models with different numbers of Keplerian signals. It should be noted that Np is a free parameter like any other.

The radial-velocity analysis follows the procedure described in Standing et al.49 and Triaud et al.12 with added post-Keplerian corrections described by Baycroft et al.59. These corrections accounted for relativistic and tidal effects on the radial-velocity measurements from the binary orbit that have been derived and tested in refs. 22,23,24,25,49. In addition, we directly fitted for apsidal precession of the binary within kima, which is the largest Newtonian effect that we expected. We found a value of \({\dot{\omega }}_{{{{\rm{bin}}}}}=66.{0}_{-54.7}^{+65.0}\,{{{\rm{arcsec}}}}\,{{{{\rm{yr}}}}}^{-1}\), which distinct but scarcely different from zero. Details of this implementation are provided in Baycroft et al.59. The prior distributions used in our analysis can be found in Supplementary Table 1.

Resulting fit

The kima combined fit of our HARPS and ESPRESSO data favours a single-planet model in addition to the binary orbit with a Bayes factor of >29,000. The Bayes factor is the ratio of the Bayesian evidence between two competing models. In our case the Bayes factor is the number of posterior samples obtained with Np planetary signals over those with Np − 1. The Bayes factor indicates the measure of support in favour of one model over another49,60,61.

A Bayes factor of >150 indicates very strong evidence49,62 in favour of a single planet in addition to the binary orbit.

When searching for the inner transiting planet in the data we obtained a Bayes factor of 1.4 in favour of two planetary signals. This is categorized as inconclusive evidence of any further signals in the data.

Forcing a fit on a 95 d Keplerian signal yielded no clear signal corresponding to TOI-1338 b with posterior samples having a semi-amplitude consistent with 0 m s−1. This fit still produced a clear detection of BEBOP-1 c.

To obtain orbital parameters for the system, we followed the same procedure detailed in Standing et al.49. Proposed posterior samples with orbits that cross one another, or enter the instability region of the binary, were removed. The remaining samples were clustered with the HBDSCAN clustering algorithm63. Clusters corresponding to the binary and BEBOP-1 c were then plotted using the Corner package version 2.0.1 (ref. 64). Orbital parameters were then determined as the 50th percentile, with 1σ uncertainties estimated from the 14th and 84th percentiles of the cluster. Corner plots for the binary and BEBOP-1 c can be seen in Supplementary Figs. 1 and 2 respectively.

Constraints on TOI-1338 b and further planetary companions

Using kima in the same way as Standing et al.49 and Triaud et al.12 we calculated a detection limit on additional undetected planetary signals in the radial-velocity data. First, we removed the highest-likelihood Keplerian model corresponding to BEBOP-1 c from the data. Following this, to calculate the detection limit, we fixed Np = 1 in our fit, included the binary with tight priors on its parameters and obtained posterior samples of all remaining signals that were compatible with the data. This method is conceptually similar to that described in Tuomi et al.65, where the sampler was forced to fit an additional signal to the data. Any signals found are compatible with the data, but yet undiscovered, as only one planetary signal was present in our original fit.

The resulting posterior samples can be seen as a greyscale density plot in Fig. 4, with a blue 99% contour corresponding to our detection limit. The blue limit demonstrates that our analysis was sensitive to additional sub-Saturn mass planets for periods out to 2,000 d, while sensitive to Neptune-mass planets near the instability limit.

We note a density of posterior samples at periods around 100 d in agreement with the presence of TOI-1338 b seen in TESS photometry17. Following the findings described in Standing et al.49, we calculated an additional detection limit to place an upper limit on the mass of TOI-1338 b. This limit was calculated in the same manner as the blue line, although only using posterior samples with eccentricities <0.1 (the approximate upper limit on the eccentricity of TOI-1338 b17, and a value allowed by our orbital stability analysis). A running mean was applied to the red eccentricity cut line to ensure that >1,000 samples were in each bin. The resulting red detection limit demonstrated the sensitivity of our analysis to circular planets at the orbital period of TOI-1338 b was ~2.4 ± 0.1 m s−1. This allowed us to place an upper limit on the mass of TOI-1338 b of 21.8 ± 0.9 M. With a radius of ~6.9 R, we calculated the mean density of TOI-1338 b to be <0.36 g cm−3. The mass of planet b from Kostov et al.17 was primarily determined using the apsidal precession imprinted on the ETVs under the assumption of a single planet. Our study exclusively used radial velocities; as they are not sensitive to the planet’s mass, we only placed an upper limit.

The uncertainty of the detection limit was determined by performing numerical experiments with kima. We first generated a radial-velocity timeseries, following a Gaussian distribution, with dates following a log-uniform distribution. Then we ran kima just like any other system and produced a large number of posteriors (in our case 685,000). Following that, we computed a detection limit as performed in Standing et al.49 and called this our fiducial case. The next step was to calculate detection limits for many subsamples of the posterior and measure their fractional distanced to the fiducial detection limit. We found that the fractional error in the position of subsamples’ detection limits followed a square root law. Consequently, we fitted these data with a function y = ax−1/2, where y is the fractional uncertainty of the detection limit at a given orbital period and x is the number of posteriors within a given posterior subsamples. We found a = 15.1 ± 0.3. We used this relation to represent an uncertainty in Fig. 4.

False and true inclusion probabilities

We computed the true inclusion probability (TIP) and false inclusion probability (FIP) for a signal being present in the data over various frequency bins26. Plotting this in a periodogram gives similar information to the detection limit described above. However, where the detection limits give us information about an upper limit on the mass of a potential planetary signal, the TIP periodogram effectively gives us the probability of there being a planetary signal at that given period. It has been shown that using this metric as a detection criterion is optimal in the context of exoplanet detection27. We found one peak in the TIP periodogram beyond the detected planet c at ~700 d with a TIP of 0.94. This is shown in Supplementary Fig. 3, which presents the FIP and TIP periodograms. We attributed this signal to the window function as seen in Supplementary Fig. 4, although further observations will provide greater insight into the source of the signal.

Stellar activity

Chromospheric emission lines observed in the stellar spectrum often trace stellar magnetic activity. Here we describe the activity indices measured and used in our analysis. We used the open-source package ACTIN66 to measure the Ca ii H&K, He i, Na D doublet (a and b), Ca i and Hα activity indices.

First, we computed a generalized Lomb–Scargle periodogram67 of each activity indicator, from individual instruments, and used the combined dataset. In Supplementary Fig. 4a,b we show the window function of each individual and combined dataset and the periodogram of the radial velocity. We computed false alarm probability levels of 10%, 1% and 0.1% using a bootstrap randomization of the dataset. We considered a signal to be significant if the false alarm probability level was <0.1%. We searched for periodic signals of chromospheric activity indicators to investigate the possibility of BEBOP-1 c’s period Pc being produced by magnetic activity of BEBOP-1A (the primary). Supplementary Fig. 4c–g depicts the periodogram of the Ca ii, Hα, Na D, He i and Ca i indices. None of the activity indicators showed any significant signal at or near Pc (~215 d). We saw a significant period at ~7.5 d in Na D (false alarm probability ≈ 0.1%) and He i (false alarm probability ≈ 1%); however, the nature of these signals was not obvious. We saw weak signals in Hα at 270 d caused by a combination of window function and a long-period term, but the signal is not significant. In addition, the activity time series shown in Supplementary Fig. 5 does not show any obvious modulation.

We searched All-Sky Automated Survey (ASAS)68 archival data to constrain the rotation period and to investigate the nature of the BEBOP-1 c signal. The ASAS observations span more than 10 years. The ASAS data shows a strong signal at 61 d (10% false alarm probability), which could be related to stellar rotation (~3Prot).

In addition, analysis of the radial-velocity bisector shows no correlation with the ~215 d signal, yielding a Pearson correlation coefficient of <0.052.

The ASAS data and activity indicators do not show any significant signal at ~215 d, therefore this signal is likely to be planetary in nature.

System dynamics

In this section we deal with various aspects of the orbital dynamics of BEBOP-1, first looking at the stability of the system, and then estimating whether the outer planet, BEBOP-1 c, will show transits at some point into the future.

Orbital stability

The orbital solution given in Table 1 shows a compact two-planet circumbinary system (abin = 0.13 au, ab = 0.46 au and ac = 0.79 au). The inner planet has a maximum mass similar to Neptune (mb = 21.8 M) and is close to the circumbinary stability boundary17,69, whereas the minimum mass of the outer planet is similar to Saturn (mc = 0.21 MJup). As a consequence, we expected strong mutual gravitational interactions between the stars and the planets. To study the stability of the system, we performed a global frequency analysis70,71 in the same way as conducted for other circumbinary planetary systems72. In our analysis, we always considered the maximum mass of the inner planet, which can be seen as a superior limit for stability. Moreover, the mass of this planet is relatively small and does not greatly impact the stability, and so smaller masses do not affect the global picture described here.

The system was integrated on a regular 2D mesh of initial conditions in the vicinity of the best fit (Table 1). We used the symplectic integrator SABAC473, with a step size of 0.001 yr and general relativity corrections. Each initial condition was integrated for 5,000 yr, and a stability indicator, \(\varDelta =| 1-{n}_{{\mathrm{b}}^{{\prime} }}/{n}_{\mathrm{b}}|\), was computed. Here, nb and \({n}_{{\mathrm{b}}^{{\prime}} }\) are the main frequency of the mean longitude of the inner planet over 2,500 yr and 5,000 yr, respectively, calculated via the frequency analysis71. Note that while the osculating mean motion varies over a single planetary orbit as a result of energy exchange with the binary and planet c, nb calculated over time intervals much longer than any resonant variations is constant for stable systems, while it drifts for unstable systems until one of the planets escapes. The results are reported in colour in Supplementary Figs. 6–8, where yellow represents strongly chaotic trajectories with Δ > 10−2, while extremely stable systems with Δ < 10−8 are shown in purple/black. Orange indicates the transition between the two for Δ ≈ 10−4.

Observationally, only the inner planet’s eccentricity is well constrained: eb = 0.088 ± 0.004 (ref. 17). In contrast, only an upper limit can be placed for the outer, non-transiting planet: ec < 0.1 (Table 1).

Therefore, in a first experiment, we explored the stability of the system in the plane (eb, ec), assuming coplanar orbits. The results are shown in Supplementary Fig. 6. We observed that that the eccentricities of both planets must be smaller than 0.1 to ensure a stable system. Moreover, as we already have eb ≈ 0.1 (ref. 17) for the inner planet, the only remaining possibility for the outer planet is ec ≈ 0. We thus adopted ec = 0 in the following stability analyses.

The inner planet was not detected in the radial-velocity data, its presence can only be inferred from photometric measurements17. Therefore, in a second experiment, we explored the stability of the orbit of the inner planet by varying the orbital period and the eccentricity of this planet, assuming coplanar orbits (Supplementary Fig. 7). This allowed us to test the compatibility of the two independent observational datasets. We observed that the inner planet lies in a small stability region that is shaped by the presence of the binary system on the left-hand side and by the presence of the massive outer planet on the right-hand side. We thus concluded that the two-planet circumbinary solution is reliable. However, we assumed ec = 0 to draw the stability map obtained in Supplementary Fig. 7. As we increase the eccentricity of the outer planet, the small stable region was quickly degraded and completely disappeared for ec > 0.1, in conformity with the results shown in Supplementary Fig. 6. Supplementary Fig. 7 shows that the inner planet, TOI-1338 b, is surrounded by unstable regions. If the planet migrated to its current location, it would have to pass through two resonances with the outer planet. This could indicate consequences for formation migration in the system.

The radial-velocity technique alone is unable to constrain the inclination, Ic, and the longitude of the node, Ωc, of the outer planet. As a result, we could only determine the minimum value of its mass, which corresponds to the coplanar system (Ic = 90°) that we assumed in previous analyses. However, in contrast to the inner planet, the outer planet does not transit, and thus cannot lie exactly in the same orbital plane as the remaining bodies in the system. In a final experiment, we explored the stability of the system by varying the inclination and longitude of the node of the outer planet (Supplementary Fig. 8). We observed that the system can be stable within a circle centred at the coplanar solution, which corresponds to mutual inclinations smaller than 40°. A larger stability region also exists centred at (Ωc = 180°, Ic = 90°), but it corresponds to mutual inclinations higher than 120° (that is, to retrograde orbits, which are more unlikely from a formation point of view). As we changed Ic, the mass of the outer planet increased. At the boundary of stability, Ic = 90 ± 40°, we obtained a maximum mass of the outer planet of mmax,c = 0.28 MJup. Note, however, that we could also get a mutual inclination of 40° with Ic = 90° and Ωc = ± 40°, for which the mass of the planet was on the low side, mmin,c = 0.21 MJup. Thus, the source of instability must be mutual inclinations above the 40° threshold, and not masses higher than 0.28 MJup. Again, we assumed ec = 0 to draw the stability map obtained in Supplementary Fig. 8. As we increased the eccentricity of the outer planet, the radius of the stable circle quickly shrank and completely disappeared for ec > 0.1, in conformity with the results shown in Supplementary Fig. 6.

Possible transits of BEBOP-1 c

Orbits of circumbinary planets exhibit nodal precession. This changes the orientation of the planet’s orbit with respect to both the binary and the observer. This means that a planet changes from a transiting to non-transiting configuration15,30. The precession timescale is typically on the order of decades, and hence can be observable with long baselines such as those possible with Kepler and TESS. Kepler-413 exhibited this on–off transit sequence31. Kepler-453 did not start transiting until half way through the Kepler mission32.

Refs. 33,34 derived an analytic criterion to determine whether a planet will ever enter transitability on the primary (A) or secondary (B) star during its precession cycle:

$$\Delta I > \left\vert \frac{\uppi }{2}-{I}_{{{{\rm{bin}}}}}\right\vert -{\sin }^{-1}\left(\frac{{a}_{{{{\rm{A}}}},{{{\rm{B}}}}}}{{a}_{{{{\rm{p}}}}}}\sin \left\vert \frac{\uppi }{2}-{I}_{{{{\rm{bin}}}}}\right\vert +\frac{{R}_{{{{\rm{A}}}},{{{\rm{B}}}}}}{{a}_{{{{\rm{p}}}}}}\right),$$

where ΔI is the mutual inclination between the planet and binary orbit. It may seem counter-intuitive at first that a planet–binary misalignment makes transitability more likely. The reason is that the planet’s sky inclination oscillates around the binary’s sky inclination, with an amplitude equal to ΔI. A higher ΔI therefore makes it more likely that the planet’s inclination will become close to 90°, and hence show transitability. For eclipsing binaries Ibin is near 90°, and hence the vast majority of circumbinary planets orbiting eclipsing binaries will eventually transit.

Placing the values for BEBOP-1 c into equation (2) yields \(\Delta {I}_{\min }=-0.1{1}^{\circ }\) for the primary star. The negative inclination criterion means that BEBOP-1 c is guaranteed to eventually transit regardless of its mutual inclination. This is mainly because the binary is so well aligned with our line of sight (Ibin = 89.658°) and the primary star is relatively large (RA = 1.299 R). Although we think that BEBOP-1 c is guaranteed to eventually transit, we are unable to predict when and how frequently. The precession period is:

$${P}_{{{{\rm{prec}}}}}={P}_{{{{\rm{p}}}}}\frac{16}{3}{\left(\frac{{a}_{{{{\rm{p}}}}}}{{a}_{{{{\rm{bin}}}}}}\right)}^{2}\frac{1}{\cos \Delta I},$$

where we assumed circular orbits30,74. For BEBOP-1 c Pprec = 119 yr, assuming that ΔI is close to zero, as is the case for known circumbinary planets. With modern advances in medical science, there is a chance that the authors will live to see BEBOP-1 c transit.

System formation

The coplanarity between the planet and binary orbit planes for the circumbinary planets that have been discovered so far strongly suggests that these planets were formed in circumbinary protoplanetary disks that were themselves closely aligned with the binary orbit plane. We present here the results from a suite of simulations of circumbinary planet formation that were performed to examine plausible scenarios for the origin of the TOI-1338 b and BEBOP-1 c system.

Circumbinary disk and N-body model

Our simulations were performed using a newly developed code designed specifically to examine the formation of circumbinary planet systems. The code employs the N-body symplectic integrator MERCURY6, adapted to include a central binary system38,39. The code utilizes the ‘close-binary’ algorithm39 that calculates the temporal evolution of the positions and velocities of each body in the simulations with respect to the centre of mass of the binary stars, subject to gravitational perturbations from both stars and other large bodies. The evolution of the circumbinary disk is calculated using a 1D viscous α–disk model75, solving the standard diffusion equation with additional terms that account for the possible presence of a gap-forming planet and a photoevaporative wind:

$$\frac{{\mathrm{d}}\varSigma }{{\mathrm{d}}t}=\frac{1}{r}\frac{{\mathrm{d}}}{{\mathrm{d}}r}\left[3{r}^{1/2}\frac{{\mathrm{d}}}{{\mathrm{d}}r}\left(\nu \varSigma {r}^{1/2}\right)-\frac{2\varLambda \varSigma {r}^{3/2}}{G{M}_{* }}\right]-\frac{{\mathrm{d}}{\varSigma }_{{{{\rm{pe}}}}}}{{\mathrm{d}}t}$$

Here, \(\frac{{\mathrm{d}}{\varSigma }_{{{{\rm{pe}}}}}}{{\mathrm{d}}t}\) is the rate of change in surface density due the photoevaporative wind, Λ is the torque per unit mass that operates when a planet forms and becomes massive enough to open a gap in the disk and ν is the disk viscosity75, given by:

$$\nu =\alpha {c}_{{{{\rm{s}}}}}^{2}/\varOmega ,$$

where cs is the local isothermal sound speed, \(\varOmega =\sqrt{\frac{G{M}_{* }}{{r}^{3}}}\) is the Keplerian frequency and α is the viscosity parameter. The planet torque per unit mass is given by:

$$\varLambda ={{{\rm{sign}}}}(r-{r}_{{{{\rm{p}}}}}){q}^{2}\frac{G{M}_{* }}{2r}{\left(\frac{r}{| {\varDelta }_{{{{\rm{p}}}}}| }\right)}^{4},$$

where q is the planet/star mass ratio, rp is the planet orbital radius and |Δp| = max(H, |r − rp|); H is the local disk scale height. We assumed that the disk is in thermal equilibrium, and as such we used an iterative method to solve the following equation76:

$${Q}_{{{{\rm{irr}}}},{{{\rm{A}}}}}+{Q}_{{{{\rm{irr}}}},{{{\rm{B}}}}}+{Q}_{\nu }+{Q}_{{{{\rm{cloud}}}}}-{Q}_{{{{\rm{cool}}}}}=0,$$

where we balanced irradiation heating from both central stars (Qirr,A+B), background heating from the residual molecular cloud (Qcloud) and viscous heating (Qν) with blackbody cooling (Qcool).

Mass loss due to photoevaporative winds, resulting from high-energy photons emitted by both the central stars and nearby externally located stars, occurs on a timescale determined by the adopted flux of high-energy photons77,78.

Hydrodynamical simulations have shown that circumbinary disks develop precessing eccentric inner cavities, with their sizes and eccentricities depending on the properties of the binary and disk79,80. This cavity plays an important role in the evolution of planets that migrate into its vicinity. To mimic the presence of this cavity in the 1D viscous disk model, we used a variable α model fitted to results from 2D hydrodynamic simulations using FARGO3D81, which showed that the mass flux through the cavity remained roughly constant within the region around the binary. For these FARGO3D simulations we adopted a computational domain that spanned 0.13–20 au, and for the numerical grid we adopted a resolution of Nr × Nϕ = 768 × 512 (radial × azimuth), with logarithmic radial spacing. We used the stellar parameters outlined in this work, and the disk mass lying within 40 au was set to equal 6% of the combined binary mass. The viscosity parameter α = 10−3 and the constant disk aspect ratio was set to 0.05. To ensure that the simulations reached equilibrium, we ran them for 30,000 binary orbits.

Planet migration

Planets with masses that substantially exceed a lunar mass undergo migration because of gravitational interactions with the surrounding disk. We followed ref. 82 and included type-I migration in the model via the culmination of the torque formulae that account for Lindblad and corotation torques42, as well as those of eccentricity and inclination damping83,84:

$$\begin{array}{l}{\varGamma }_{{{{\rm{I}}}},{{{\rm{tot}}}}}={F}_{L}{\varGamma }_{{{{\rm{LR}}}}}+\left\{{\varGamma }_{{{{\rm{VHS}}}}}{F}_{{p}_{v}}{G}_{{p}_{v}}+{\varGamma }_{{{{\rm{EHS}}}}}{F}_{{p}_{v}}{F}_{{p}_{\chi }}\sqrt{{G}_{{p}_{v}}G{p}_{\chi }}+{\varGamma }_{{{{\rm{LVCT}}}}}(1-{K}_{{p}_{v}})\right.\\\qquad\quad\ +\left.{\varGamma }_{{{{\rm{LECT}}}}}\sqrt{(1-{K}_{{p}_{v}})(1-{K}_{{p}_{\chi }})}\right\}{F}_{e}{F}_{i}\end{array}$$

where ΓLR, ΓVHS, ΓEHS, ΓLVCT and ΓLECT are the Lindblad torque, vorticity- and entropy-related horseshoe drag torques, and linear vorticity- and entropy-related corotation torques, respectively, as given by equations (3)–(7) in ref. 85. The functions \({F}_{{p}_{v}}\), \({F}_{{p}_{\chi }}\), \({G}_{{p}_{v}}\), \({G}_{{p}_{\chi }}\), \({K}_{{p}_{v}}\) and \({K}_{{p}_{\chi }}\) are related to the ratios between viscous/thermal diffusion timescales and horseshoe libration/horseshoe U-turn timescales, as given by equations (23), (30) and (31) in ref. 85. If a planet becomes massive enough to form a gap in the disk86, its migration changes from type I to type II. When transitioning from type-I to type-II migration the model accounts for gap formation self-consistently by calculating the torque acting on the disk due to the planet, with the back-reaction driving migration87. Planets in the vicinity of the inner cavity of the circumbinary disk will experience time-varying forces arising from its eccentricity and precession. These are not naturally captured in a 1D disk model, so we have added terms to the evolution equations to incorporate these effects. Using the results from the FARGO3D simulations described above, we calculated an azimuthally averaged eccentricity profile that, when used in conjunction with a uniformly precessing disk, can give the velocity of the gas in an eccentric disk at any azimuthal location. Following the calculated precession rates from previous works80, we assumed that the disk precession rate was equal to 3,000 binary orbits. Using the steadily precessing 2D eccentric structure of the disk obtained from the hydrodynamic simulations, we created a 2D map of the radial and azimuthal forces that an embedded particle at any position in the disk would be subject to. This map was interpolated during the N-body simulations to find the force acting on any planet that forms.

Planetary growth

The growth of planetary seeds in the model occurs via pebble accretion, and once a planet exceeds an Earth mass it starts to accrete gas from the disk. Pebble accretion models have shown that as protoplanetary disks evolve, dust coagulates into pebbles and settles in the midplane, where the pebbles drift inwards41. This creates a pebble production front that expands outwards over time. As the pebbles drift through the disk, they encounter planetary embryos that can accrete the pebbles with an efficiency that depends on the properties of the disk and planet88,89. We adopted the models of refs. 41,89 to account for the production of pebbles in the disk, as well as accretion onto planetary embryos. While such models were derived for single stars, with no perturbing forces from a central binary, they should be sufficiently accurate for the circumbinary disk models we present here. This is because the system is a close binary, and as such once material is only around a few astronomical units away from the central stars the gravitational force it feels is very similar to that of a single star. Given that pebble production primarily occurs far from the binary, in the outer disk regions, we assumed that the formulation for single stars is accurate. In terms of planets accreting pebbles, the same applies with most planets accreting pebbles at distances greater than 2 au. However, some planets are able to migrate and accrete pebbles near the cavity, and here it would not be appropriate to assume that the pebbles follow circular Keplerian orbits. Results from previous work have shown that dust particles with small Stokes numbers closely follow the gas90, and as such we assumed that the pebbles follow the same eccentric profiles used to calculate the torques acting on the planet in the vicinity of the central cavity. The relative velocities between pebbles drifting past the planet were then calculated and used in the equations for pebble accretion89.

Gas accretion onto the planets was modelled using a recently developed empirical fit44 to the results of detailed 1D envelope structure models43 that account for local disk conditions:

$$\begin{array}{rcl}{\left(\frac{{\mathrm{d}}{M}_{{{{\rm{ge}}}}}}{{\mathrm{d}}t}\right)}_{{{{\rm{local}}}}}&=&1{0}^{-10.199}\left(\frac{{{{M}}}_{\oplus }}{{{{\rm{yr}}}}}\right){f}_{{{{\rm{opa}}}}}^{-0.963}{\left(\frac{{T}_{{{{\rm{local}}}}}}{1\,{{{\rm{K}}}}}\right)}^{-0.7049}{\left(\frac{{M}_{{{{\rm{core}}}}}}{{{{M}}}_{\oplus }}\right)}^{5.6549}{\left(\frac{{M}_{{{{\rm{ge}}}}}}{{{{M}}}_{\oplus }}\right)}^{-1.159}\\ &&\times {\left[\exp \left(\frac{{M}_{{{{\rm{ge}}}}}}{{M}_{{{{\rm{core}}}}}}\right)\right]}^{3.6334}.\end{array}$$

where Tlocal is the local disk temperature, fopa is an opacity reduction factor, equal in this work to 0.01, and Mcore and Mge are the planet’s core and gas envelope masses, respectively. Given that these models calculate orbit averaged accretion rates, we assumed that this is also valid for planets in eccentric circumbinary disks; however, further work examining the validity of this assumption should be undertaken. We note these models predict that gas accretion starts off very slowly and speeds up as the core and envelope grow in mass. The onset of gas accretion therefore does not generally result in the formation of a gas giant planet because the envelope contracts on its Kelvin–Helmholtz timescale.

The resulting circumbinary planet systems

The simulations were initiated by placing 42 planetary seeds throughout the disk between 2 and 20 au, with eccentricities and inclinations distributed uniformly up to e = 0.02 and i = 0.5°, respectively. The initial masses of the seeds were set to equal one-tenth of the transition mass, which is where pebble accretion becomes efficient as the planetary core begins to accrete from the entirety of its Hill sphere, as opposed to its Bondi sphere. These initial masses were between 10−4 and 10−3M and are consistent with recent simulations of planetary embryo formation within protoplanetary disks based on gravitational collapse91. We initialized the gas surface density according to \(\varSigma ={\varSigma }_{0}{\left(\frac{r}{1\,{{{\rm{au}}}}}\right)}^{-1}\), where Σ0 depends on the initial disk mass. We explored disk masses between 10 and 15% of the combined stellar mass in disks that extend to 100 au, and we considered metallicities of 0.5, 1 or 2× the Solar value. We assumed a viscous α of 2 × 10−3, an f41 parameter for extreme ultraviolet photoevaporation of 100 and an external photoevaporative mass loss rate for a disk of size 100 au of 3 × 10−7M yr−1.

Supplementary Fig. 9 shows the mass and semimajor axis evolution from an example simulation that formed a planetary system similar to BEBOP-1. Black data points show the final masses and semimajor axes of the surviving planets and the vertical black dashed line denotes the stability boundary92. The red triangle and plus sign indicate the locations of TOI-1338 b and BEBOP-1 c.

The formation of this system occurred as follows. As the pebble front moved outwards, the planetary embryos on the most circular orbits were able to accrete pebbles efficiently, allowing a number of them to grow to masses greater than an Earth mass. These planets began to migrate, generally inwards towards the central cavity, and continued to accrete drifting pebbles, as well as gas. The central cavity in the disk provided a positive surface density gradient in the gas, and this allowed corotation torques to balance Lindblad torques for planets arriving there, resulting in migration stalling. Hence, inward migrating planets started to congregate near the outer edge of the cavity, with some resonant chains forming. As the planets continued to grow in mass, two planets with masses of ~10 M collided, forming a more massive core. This planet was then able to accrete gas more efficiently and entered a brief period of runaway gas accretion to become a gas giant. As the planet’s mass increased, it migrated closer to the central stars, pushing planets interior to it into the cavity, and closer to the stability boundary. This resulted in the innermost planets being ejected from the system as they crossed the stability boundary and were gravitationally scattered by the central stars, although the planet destined to become the TOI-1338 b analogue remained outside of the boundary. The gas giant planet opened a gap in the disk and began to undergo slow, inwards, type-II migration while continuing to accrete gas through the gap at the viscous supply rate. After 1.8 Myr the disk reached the end of its life and was fully dispersed due to photoevaporative winds, and the giant planet stopped accreting and migrating, leaving both planets with masses and semimajor axes similar to those inferred from the observations. The system was allowed to evolve for a further 8 Myr, during which time it remained stable, yielding the final system shown in Supplementary Fig. 9.

This evolution scenario was a common outcome for a number of simulated systems, with planets growing through pebble accretion at large radii in the disk before migrating inwards towards the central cavity. Planets congregated there, leading to collisions and some ejections. Supplementary Fig. 10 shows the mass versus semimajor axis for all planets formed in the simulations, with the colour coding showing the metallicity of the system in comparison with the solar value (this determines the mass in pebbles assumed in the models). Planets shown as grey data points have been lost from the systems through collisions with more massive planets or by ejection. The black dashed line shows the stability boundary, while the black triangle and plus sign show the masses and locations of TOI-1338 b and BEBOP-1 c.

Supplementary Fig. 10 shows that formation of TOI-1338 b analogues is a relatively common outcome of the simulations, with numerous super-Earth and Neptune-mass planets being formed with similar orbital periods. This is unsurprising given that these planets become trapped relatively easily around the cavity, close to the observed location of TOI-1338 b. For BEBOP-1 c, this planet has fewer simulated planets in its proximity, a result of its observed mass. At this mass planets are in a runaway gas accretion regime, where they quickly grow to masses greater than that of Saturn. Indeed, in our best-fit simulation, the gas giant planet had a mass roughly twice that inferred for BEBOP-1 c. In our best-fitting simulations, runaway gas accretion was initiated close to the end of the disk lifetime, which limited the amount of gas that could be accreted by the planets. This necessity for appropriate timing could indicate that BEBOP-1 c formed very late in the disk lifetime.

Looking at the metallicities required to form the planets, no systems with 0.5× solar metallicity were able to form systems similar to BEBOP-1. This was because cores with sufficient mass to undergo efficient gas accretion were unable to form. On the other hand, systems with 2× solar metallicity were too effective at forming massive cores, resulting in too many gas giant planets forming and few planets with masses comparable to TOI-1338 b remaining in the system, making them poor fits for comparison. These results show that the metallicity of the system and how efficiently dust is converted into planets are important for determining the architectures of circumbinary planet systems.

Finally, we note that the orbital configuration of BEBOP-1, with planet periods of 95 and 215 d and the more massive planet on the outside, is consistent with the prediction of Fitzmaurice et al.9 in their study of migrating multiplanet circumbinary systems. They predicted that if there is a planet near the stability limit, as is the case for BEBOP-1, then any equal or more massive outer planets would be located on a period more than double that of the inner planet. Their simulations show that if an exterior planet carrying greater angular momentum reaches the 2:1 resonance with the inner planet, the two lock into resonance and the inner planet is pushed into the inner cavity, resulting in ejection. The periods in BEBOP-1 at 95 and 215 d are explained by the disk dissipating (and hence stopping migration) before the outer planet reached the 2:1 resonance.

Prospects for atmospheric follow-up with JWST

To assess the suitability of TOI-1338 b for atmospheric characterization using transmission spectroscopy, we calculated its transmission spectroscopy metric (TSM) as established by Kempton et. al.13. A planet’s TSM is proportional to the signal-to-noise ratio that could be achieved by observations using JWST, and it depends on the planet’s mass, radius and equilibrium temperature and the host star’s radius and J-band magnitude.

Calculation of TOI-1338 b’s equilibrium temperature is non-trivial; its non-zero eccentricity and changing irradiation levels caused by the binary mean that the temperature oscillates between minimum and maximum values. Full modelling of this, as was done in Kane and Hinkel93, is beyond the scope of this Article, so we estimated a mean equilibrium temperature on the basis of two extremes: when the secondary star is closest to and furthest from the planet. The equilibrium temperature calculated from the irradiation of just the primary star is 501 K, and the motion of the secondary star will cause the true equilibrium temperature to vary between 603 and 659 K.

We calculated the TSM following Kempton et al.13 using a mean Teq = 630 K and the mass upper limit of Mb < 21.8 M in the first instance, yielding a TSM of 39. This value is below the suggested JWST cutoff of 96 for planets in the sub-Jovian regime. However, the mass used for this calculation was the upper limit; a lower mass would imply a larger scale height and therefore a substantially larger TSM.

In Supplementary Fig. 11 we present the TSM of TOI-1338 b compared with other known exoplanets. Its position shows that even the lower limit of its TSM range compares favourably with other sub-Jovian sized planets in its temperature regime. We have indicated with an arrow the range of TSMs possible for a mass down to 10 M, which would imply a mean density of 0.17 g cm3, comparable to Kepler-47 c, for example4.

We also note that, crucially, of the now 15 known circumbinary exoplanets, TOI-1338 b is the only one for which observations of this kind can currently be pursued. Most Kepler systems are too faint (for example Kepler-47 with a Jmag = 13.970 (ref. 94) or Kepler-34 with a Jmag = 13.605 (ref. 94)) and others (such as Kepler-16) no longer transit1. Therefore, despite the challenges it may present, TOI-1338 b may be the only possibility to shed light on the atmospheric make-up of circumbinary planets.