# libtmux.Session._refresh

- **Module:** libtmux.Session
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/neo.py#L868
- **Page:** https://libtmux.org/reference/py/libtmux-session-_refresh/

```
libtmux.Session._refresh(self, obj_key: str, obj_id: str, list_cmd: ListCmd = "list-panes", list_extra_args: ListExtraArgs = None) -> None
```

Refresh dataclass fields from a single ``list-*`` row.

Used by the public ``refresh()`` methods on :class:`~libtmux.Pane`,
:class:`~libtmux.Window`, :class:`~libtmux.Session`, and
:class:`~libtmux.Client`. Each subclass guards its identity field
(``pane_id``, ``window_id``, ``session_id``, ``client_name``)
against ``None`` before delegating here; this base method enforces
the same precondition explicitly so the guarantee survives
``python -O``, where an ``assert`` would be stripped.

## Raises

- `ValueError` — When ``obj_id`` is ``None``. Surfaces a clear error under
``python -O``, matching the contract of the public ``refresh()``
methods.
