Skip to content

Conversation

@CaitlynByrne
Copy link

Summary

  • Persist agent output (LLM responses, tool invocations, errors) to a per-project agent_sessions.db so past sessions can be reviewed and debugged
  • Controlled by a global "Session Logging" toggle in settings (default: on)
  • Buffered writes in WebSocket (flush every 50 lines or 2s) to minimize I/O overhead

Changes

  • New server/services/agent_session_database.py with SQLAlchemy models and CRUD operations
  • New server/routers/agent_sessions.py — REST API for GET/DELETE sessions and logs with filtering
  • WebSocket integration for real-time log capture
  • Settings toggle in UI and backend
  • .gitignore auto-refreshed for existing projects on first use

Test plan

  • Start an agent session and verify logs appear in agent_sessions.db
  • Toggle session logging off in settings and confirm no new logs are written
  • Verify buffered writes flush correctly (50 lines or 2s timeout)
  • Test REST endpoints: list sessions, get session logs, delete session
  • Confirm .gitignore is updated for existing projects

🤖 Generated with Claude Code

Persist agent output (LLM responses, tool invocations, errors) to a
per-project agent_sessions.db so past sessions can be reviewed and
debugged. Controlled by a global "Session Logging" toggle (default: on).

- New agent_session_database.py with SQLAlchemy models and CRUD
- Buffered writes in WebSocket (flush every 50 lines or 2s)
- REST API: GET/DELETE sessions and logs with filtering
- Settings toggle in UI and backend
- .gitignore auto-refreshed for existing projects on first use

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant