12 · 18 extension points

Where new behavior goes

For everything you might want to add there is a specific place, and it is documented.

The project maintains a map of goals and mechanisms. You want to add a model provider, a new tool, a permission policy, a command, background work, an integration with your editor. For each one there is a specific documented place.

On this site that map is a lookup, generated from the same file that feeds the rest of the section, so it cannot drift from the repository.

The group that gets used most

The tool pipeline deserves a mention of its own because it is where most people hook in and where it is easiest to get things wrong.

PointWhat forCan it change things
Before runningDecide whether a tool may runyes, it blocks it
AroundWrap execution with a timeout, a retry or a measurementyes, it wraps it
AfterTransform the result before returning ityes, the result
ObserveFind out what is happeningno, it only watches