Skip to content

fix: Gate AI debug logs behind debugAI and add resource pre-check#1142

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/debug-ai-build-order-F5AJY
Jan 30, 2026
Merged

fix: Gate AI debug logs behind debugAI and add resource pre-check#1142
braedonsaunders merged 1 commit into
mainfrom
claude/debug-ai-build-order-F5AJY

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner
  • Replace console.log/warn with debugAI.log/warn in AICoordinator
  • Replace console.warn with debugAI.warn in AIBuildOrderExecutor
  • Add canAffordUnit() helper to pre-check resources/supply
  • Filter macro rule train options to only affordable units before attempting to train, eliminating "INSUFFICIENT RESOURCES" spam

This fixes two issues:

  1. AI diagnostic logs now respect the debug toggle in settings
  2. AI no longer attempts to train units it can't afford

https://claude.ai/code/session_019DjUjBvQJPcLiuUb46mbFi

- Replace console.log/warn with debugAI.log/warn in AICoordinator
- Replace console.warn with debugAI.warn in AIBuildOrderExecutor
- Add canAffordUnit() helper to pre-check resources/supply
- Filter macro rule train options to only affordable units before
  attempting to train, eliminating "INSUFFICIENT RESOURCES" spam

This fixes two issues:
1. AI diagnostic logs now respect the debug toggle in settings
2. AI no longer attempts to train units it can't afford

https://claude.ai/code/session_019DjUjBvQJPcLiuUb46mbFi
@braedonsaunders braedonsaunders merged commit 222c0b3 into main Jan 30, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/debug-ai-build-order-F5AJY branch January 30, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants