Skip to content

fix: loadAgentKey path mismatch on macOS#73

Merged
George-iam merged 3 commits intomainfrom
feat/install-path-fix-20260324
Mar 24, 2026
Merged

fix: loadAgentKey path mismatch on macOS#73
George-iam merged 3 commits intomainfrom
feat/install-path-fix-20260324

Conversation

@George-iam
Copy link
Contributor

Summary

  • loadAgentKey() hardcoded ~/.config/axme/scenario-agents.json but saveScenarioAgentsStore() uses os.UserConfigDir() which is ~/Library/Application Support on macOS
  • Caused "no API key found for compliance-checker" warning on macOS — agent couldn't read keys it just provisioned
  • Fix: use loadScenarioAgentsStore() (canonical path) instead of hardcoded path
  • Also includes: source ~/.zshrc hint in install.sh + README (from prior commit)

Test plan

  • axme examples run delivery/stream on macOS — no "no API key found" warning
  • axme examples run human/cli on macOS — agent processes intent
  • go test ./... passes

When the user manually exports PATH before running install.sh via pipe,
the subprocess inherits that PATH. The old runtime check (case ":$PATH:")
would return early without modifying .zshrc, leaving future terminal
sessions without axme in PATH.

Now we only check the rc file for duplicates, which is the correct
persistent indicator.
- ensure_path now prints "source ~/.zshrc" hint after modifying rc file
- README install block includes source command
On macOS os.UserConfigDir() returns ~/Library/Application Support,
but loadAgentKey hardcoded ~/.config. This caused "no API key found"
warning on macOS because save and load used different paths.

Now loadAgentKey uses loadScenarioAgentsStore() which uses the
canonical scenarioAgentsStorePath().
@George-iam George-iam merged commit 1c6e60f into main Mar 24, 2026
1 check passed
@George-iam George-iam deleted the feat/install-path-fix-20260324 branch March 24, 2026 13:04
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.

1 participant