How to design AI agent loops: schedules, goals, and subagents in Claude Code and Codex — Blankdot