A developer running an autonomous Claude Code agent on a Windows PC discovered a persistent bug in their automation logs. For eleven days, the agent's evening summary promised to open login windows for expired sessions, but the morning task had silently stopped doing so. The discrepancy highlights the danger of decoupled reporting and execution logic in agentic workflows.
The Decoupled Promise
The agent's architecture separates the evening summary generation from the morning login task. The summary, generated at 19:00, reads a login ledger to list expired sessions. Since September 18, a morning task at 09:06 checks these sites and opens browser windows for manual login. However, on September 21, a new rule was added to the morning task: if a window opens but the login isn't confirmed, don't open it again automatically. This rule was not propagated to the summary generator.
Stale Data in the Logs
The result was a series of false promises. For a specific account page requiring a phone check, the summary claimed a window would open on October 24. A window did open on October 25 at 11:07, but it ended without a confirmed login. From that point on, the morning task suppressed further windows, yet the evening summaries from October 25 through November 12 continued to state, "I'll open the window." This pattern repeated for a bookstore admin page, with six consecutive summaries making empty promises between November 7 and 12.
Fixing the Source of Truth
The developer resolved the issue by forcing the summary to query the morning task's logic before writing its report. If a window is blocked by the repeat rule, the summary now explicitly states that the automatic window is stopped, provides the reason (such as the date of the failed login), and offers a manual command to open the window. This change ensures the user isn't waiting for an action that the system has already decided to skip.
Testing the New Logic
The fix included eight new tests to verify the behavior. The developer noted a subtle testing flaw where a break in the code passed tests accidentally because the test file name matched the setup's swapped file name, causing the broken code to read correct data by chance. Renaming the test file exposed the issue, ensuring the new logic correctly handles the ledger arguments.
Key Takeaways
- Single Source of Truth: Reporting layers must not guess the state of execution layers; they must query them.
- Rule Propagation: When adding suppression logic to a task, audit all dependent reports and notifications.
- Test Integrity: Ensure test fixtures do not accidentally mask bugs by sharing file names with production swaps.
- User Experience: A false promise is worse than silence, as it creates unnecessary waiting and confusion for the operator.
The Bottom Line
If your agent's dashboard says it's doing something, but the code says it's waiting for permission, you have a UX bug, not just a logging error. Keep your reporters and your workers talking to the same brain.