[Bug]: Integration cards ignore active agent connections until a session exists
Description
The dashboard and Integrations page infer whether Claude Code or Codex is connected only from rows returned by the sessions endpoint. A freshly registered agent connection can be active before it has produced a Q&A/session row, so the UI still renders Connect agent even though GET /api/v1/agents/connections?active_only=true reports an active connection.
Steps to reproduce
- Start the local Cognee backend and frontend.
- Register an agent with
POST /api/v1/agents/registerand a recognizedsession_id, for examplecodex_<id>. - Confirm that
GET /api/v1/agents/connections?active_only=truereturns that active connection. - Open the dashboard before the agent has created a session/Q&A record.
Actual behavior
The Codex card displays Connect agent. It changes to Connected only after a matching row appears in the sessions response.
Expected behavior
An active registered connection with a recognized session_id prefix should immediately mark the corresponding integration as connected. Existing session-derived and persisted detection should remain as a fallback.
Environment
- Cognee runtime: 1.5.3
- Cognee frontend: 1.0.0
- macOS, local backend/UI
I reproduced the behavior locally and verified that the current dev implementation still derives the badge only from session rows.
Source: topoteretes/cognee