Blog
Tags
Agentic AIVibe CodingsubagentsMCPCDNClaude Sonnet 4Claude Codeslash commandsmeta
Posts
All the Eggs and Bacon You Have
Setting up an authentication flow and a meta-subagent with Claude Code.
Series: Santa Claude
Tags: Agentic AI, subagents, Claude Sonnet 4, Claude Code
Last Updated: Wednesday, August 6, 2025 3:18 AM
This post is part of a series. Follow along with the development progress here: moodring-vibe repository. More to come!
Please note that this is not a tutorial. This is a documented first-time experience with a fully-enabled AI agent. Do not take this as professional advice. Always protect your data, use version control, and refer to documentation if you decide to follow any of these steps yourself.
We now have a team of subagents at our disposal, and they should be automatically handed the tasks that are relevant to them. That may not be a straightforward as we think.
Over sharing
In our initial app description we submitted to Claude Code, I described that one feature of Moodring would be to share links to songs from Spotify to the Moodring app so our users could easily tag them.
Claude implements this easily enough, but there is a problem: Expo apps can't currently be shared to easily. Especially in development, where we can't install Spotify in our simulator. We could release the app on TestFlight, but I'm not sure that would resolve our issue either.
After some consideration, this feature is clunky anyway. It would be much better if we just focus on a dashboard showing what the user has listened to lately, so they can add tags organically. We can circle back to the sharing feature if we see value in it later.
Supervisory duties
The Spotify Client ID isn't as sensitive as an API Key, but I want to keep this information in environment variables instead of hard-coding it into the application.
We'll also want to move this authentication process to the back end once we verify it works in its current state.
Once again, we're reminding Claude to follow the rules.
Claude ran the subagents that were relevant to the recent changes, but it didn't seem to make any changes to CLAUDE.md.
Feels like the old days
Now we can address some errors in the frontend terminal.
No errors! Let's test the login process.
We can't access the Spotify OAuth flow. Let's see why.
We test authentication again...
...and we get a new error. We like new errors. They're better than old errors.
We try to show Claude Code what the error is using the last image above.
What if we crop it?
We'll revisit this image functionality later. Claude attempts to resolve the error without knowing the message.
[Note: I was using CMD+v to paste our image, but the documentation says to use CTRL+v instead. We'll try that next time.]
This is somewhat revealing.
Claude was kind of on the right track. I had to use the Spotify Developer Dashboard to add authorized users that can authenticate with the app in development mode.
It works! But we don't want the app to ever show we're authenticated when we're not.
We also don't want our app to look like Spotify, but we'll address that when we set up our user dashboard.
Watch the watchmen
Now that we have subagents, and we know that Claude can propose subagents that might be useful, why don't we make a subagent that monitors that?
This seems worth trying. And it would be nice if Claude kept our dev servers alive while we test. But will it be effective?
I have a feeling that an MCP server could be set up to monitor our running server output for problems. We'll look into that in future posts, but for now, let's remove that functionality.
And we should specify that not only should our new workflow-automation-analyst propose new subagents, but it should review our current subagents and adjust them as necessary.
Since I introduced this new subagent during the work completed in this post, I noticed that our existing subagents weren't running reliably for tasks like pre-commit checks and creating commit messages.
We'll explore some methods of specifying clearly which agents should be used for each task. We can mention the agents by name in our prompts, but that will get tedious. Will custom slash commands ease our troubles?