# Store OpenAI responses without automatic chaining

> Agno's OpenAIResponses adds use_previous_response_id. Set it to False to keep store=True for OpenAI's response logs while Agno sends its own history and instructions on every request.

- Published: 2026-09-23
- Author: Ashpreet Bedi
- Categories: Changelog
- Canonical: https://www.agno.com/articles/store-openai-responses-without-automatic-chaining
- Markdown: https://www.agno.com/articles/store-openai-responses-without-automatic-chaining.md

With `store=True` (or `store` unset), Agno's `OpenAIResponses` used to both store responses on OpenAI and chain them for supported reasoning models. It set `previous_response_id` from the last assistant message and sent only the messages after that response, so Agno's history limits and refreshed instructions never reached the request. The only way to turn chaining off was `store=False`, which also turned off storage.

Set `use_previous_response_id=False` to keep responses in OpenAI's logs and send Agno's context every time:

```python
from agno.agent import Agent
from agno.db.in_memory import InMemoryDb
from agno.models.openai import OpenAIResponses

agent = Agent(
    model=OpenAIResponses(
        id="gpt-5.6-luna",
        store=True,
        use_previous_response_id=False,
    ),
    db=InMemoryDb(),
    add_history_to_context=True,
    num_history_runs=2,
    instructions="Answer briefly using the conversation history when relevant.",
)
```

`OpenAIResponses` builds these requests for a follow-up turn with `o4-mini` when the history already holds a response ID (real output):

```text
store=True
  store: True
  previous_response_id: resp_abc123
  input roles: ['user']

store=True, use_previous_response_id=False
  store: True
  previous_response_id: None
  include: ['reasoning.encrypted_content']
  input roles: ['developer', 'user', 'assistant', 'user']
```

`use_previous_response_id` defaults to `True`, so existing agents keep chaining for supported reasoning models whenever `store` is not `False`. `store=False` still turns off both storage and chaining. When chaining is off, `OpenAIResponses` requests encrypted reasoning, keeps it on each assistant message, and replays it before the assistant's text or function calls. Tool calls continue without a server-side chain, in regular and streaming runs. Explicit `request_params` overrides keep their precedence, so leave `previous_response_id` unset there when you use this option.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/openai/responses/stored_responses_without_chaining.py), and learn more about [OpenAI Responses](https://docs.agno.com/models/providers/native/openai/responses/overview) in the documentation.
