# usage_table_enabled

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_session_stats/usage_table_enabled)

Return whether the session usage table should be rendered.

Controlled by `[ui].show_usage_stats` or `DEEPAGENTS_CODE_SHOW_USAGE_STATS`.
Both the TUI teardown and the headless run call this rather than resolving
the option themselves, so the key and its fallback pair are written once
and the two surfaces cannot disagree about the default.

Fails open: both callers are at teardown, where an exception would cost far
more than the table is worth, so a broad catch is warranted for a leaf,
cosmetic decision with a safe default — provided it is logged rather than
swallowed. The call sites document what an escape would actually break.

`BlockingError` is excluded from that fail-open, matching
`configurable_model._resolve_openai_prompt_cache_key_enabled`: it signals
blocking I/O on the event loop, which is a real regression rather than a
config hiccup, and this is called directly from the async headless
teardown. It is matched by class name because `blockbuster` is not a
runtime dependency of this package.

The `config_manifest` import is deliberately outside the `try`, so an
`ImportError` propagates instead of being reported as a config failure.

## Signature

```python
usage_table_enabled() -> bool
```

## Returns

`bool`

Whether to render the table.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/_session_stats.py#L1447)