get_agent_entry shouldn't be touching global state