fix(claude-code-macos): fails to get response - #346
Conversation
PR Review: fix(claude-code-macos): fails to get responseSummaryThis PR addresses macOS authentication issues with Claude Code by:
✅ StrengthsCode Quality
Architecture
|
| Area | Coverage |
|---|---|
| Executable path resolution | ✅ Comprehensive (5 cases) |
| Config merging | ✅ Good (5 cases including edge cases) |
| macOS vs Linux behavior | ✅ Covered |
| Error scenarios | resolveRealPath error case |
📋 Checklist Before Merge
- Consider adding atomic rename for config directory operations
- Verify
chat.test.tsformatting change is intentional - Run
bun typecheckandbun lintto verify no regressions - Test on actual macOS with both Homebrew and npm-installed Claude
Verdict
Approve with suggestions - The core fix is sound and addresses a real issue with macOS Claude authentication. The refactoring improves testability significantly. The main concern is the data loss risk in the config merging logic which should be addressed before merging to production.
Summary
Fixes authentication and response issues when using Claude Code on macOS by improving executable path resolution and config directory handling.
Problem
On macOS, Atomic was failing to get responses from Claude Code due to two authentication-related issues:
Key Changes
Executable Path Resolution (src/sdk/clients/claude.ts)
Config Directory Handling (src/utils/claude-config.ts)
Chat Command (src/commands/chat.ts)
Testing
Migration Notes
No breaking changes for users. The fix is transparent - users with native Claude Code installs will now automatically have their auth state recognized.