  Context. Some of of the most prominent sources for energetic particles in our
Solar System are huge eruptions of magnetised plasma from the Sun called
coronal mass ejections (CMEs), which usually drive shocks that accelerate
charged particles up to relativistic energies. In particular, energetic
electron beams can generate radio bursts through the plasma emission mechanism.
The main types of bursts associated with CME shocks are type II and herringbone
bursts. However, it is currently unknown where early accelerated electrons that
produce metric type II bursts and herringbones propagate and when they escape
the solar atmosphere. Aims. Here, we investigate the acceleration location,
escape, and propagation directions of electron beams during the early evolution
of a strongly expanding CME-driven shock wave associated with herrinbgone
bursts. Methods. We used ground-based radio observations from the Nan\c{c}ay
Radioheliograph combined with space-based extreme-ultraviolet and white-light
observations from the Solar Dynamics Observatory and and the Solar Terrestrial
Relations Observatory. We produced a three-dimensional (3D) representation of
the electron acceleration locations which, combined with results from
magneto-hydrodynamic (MHD) models of the solar corona, was used to investigate
the origin of the herringbone bursts observed. Results. Multiple herringbone
bursts are found close to the CME flank in plane-of-sky images. Some of these
herringbone bursts have unusual inverted J shapes and opposite drifting
herringbones also show opposite senses of circular polarisation. By using a 3D
approach combined with the radio properties of the observed bursts, we find
evidence that the first radio emission in the CME eruption most likely
originates from electrons that initially propagate in regions of low Alfv\'en
speeds and along closed magnetic field lines forming a coronal streamer.
