# Metadata passed to run() now wins over agent metadata

> Run metadata now resolves component, then session, then call-site, so metadata passed to run() overrides the same key on agent.metadata. A behavior change worth checking when you upgrade.

- Published: 2026-08-30
- Author: Ashpreet Bedi
- Categories: Changelog
- Canonical: https://www.agno.com/articles/metadata-passed-to-run-now-wins-over-agent-metadata
- Markdown: https://www.agno.com/articles/metadata-passed-to-run-now-wins-over-agent-metadata.md

We changed how run metadata resolves. It now follows a fixed order: component, then session, then call-site. A `metadata=` value you pass to `run()` overrides the same key on `agent.metadata`.

Before, the component value won, so you could not override `agent.metadata` for a single run. A run also used to write session metadata back onto the shared component. We stopped that, so one run's metadata no longer bleeds into another.

This is a behavior change. If you counted on `agent.metadata` taking precedence, check any calls that also pass `metadata=` to `run()`.

Learn more about [metadata resolution](https://docs.agno.com/examples/agents/state-and-session/metadata-resolution) in the documentation.
