ALTER TABLE agent_sessions ADD COLUMN parent_session TEXT REFERENCES agent_sessions(id) ON DELETE SET NULL;