Finally Squashed That Invisible License Nudge Bug After 6 Failed Attempts
Sometimes the simplest bugs are the most elusive ones.
I've been chasing this annoying bug in memstack-pro for way too long. Users weren't seeing the license nudge when they should have been, and I couldn't figure out why. Six previous attempts at fixing it, all failures.
Today I finally cracked it, and honestly, I'm a bit embarrassed at how simple the root cause was.
The Problem
The license nudge was supposed to show up as a system reminder when users started a session without a proper license key. But it was just... invisible. The code looked right, the logic was sound, but users never saw it.
The Investigation
I went full detective mode on this one - even brought in multiple agents to look at it from different angles. Builder agent did the investigation and implementation, I had an independent subagent review the root cause, and a Reviewer agent verified the fix post-implementation.
Turns out the issue was buried in my session start hook. Line 149 had this innocent-looking bit of code:
cat >&2
That >&2 was redirecting the license nudge output to stderr. And here's the kicker - Claude Code's TUI silently swallows stderr from SessionStart hooks! Only stdout gets surfaced as additionalContext system reminders.
The Fix
Once I understood the CC behavior, the fix was trivial:
- Removed the
>&2redirect so the nudge goes to stdout instead - Updated the comment to reflect the correct behavior
- Committed and pushed to master
The Lesson
This is why I love build-in-public development. These "obvious in hindsight" bugs teach you so much about the tools you're working with. I had no idea about CC's stdout vs stderr handling for SessionStart hooks until I dug deep into this bug.
Now I have a clear mental model:
- stdout from SessionStart hooks → visible as system reminders
- stderr from SessionStart hooks → into the void
All three verification agents gave this fix a PASS, and honestly, I'm just relieved to finally close this ticket. Time to start a fresh session and watch that nudge appear like it should have all along.
On to the next bug! 🐛