Tool(s) Affected
All: claude-code, cursor, gemini-cli, github-copilot, openclaw, windsurf
What Happened
Running apc memory sync --all --yes (or apc sync --all --yes) when the configured LLM API key is invalid produces:
! LLM call failed (Anthropic API returned 401: {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}), skipping memory sync for claude-code
✓ claude-code: 0 memory files
! LLM call failed (...), skipping memory sync for cursor
✓ cursor: 0 memory files
... (repeated for all 6 tools)
What Was Expected
- The overall sync should fail loudly with a non-zero exit code
- The
✓ success indicator should NOT appear after a failure
- The final summary should NOT say "Synced: 0 memory files" as if that's acceptable
- The user should be told how to fix it:
apc configure --provider anthropic --api-key ...
Root Cause
In src/appliers/base.py, apply_memory_via_llm() catches the exception and returns 0 (silent skip), then sync_helpers.py counts "0 memory files" and prints a ✓. The warning is printed but then overridden by the success indicator.
Impact
A user who runs apc sync with an expired or misconfigured API key gets zero feedback that their 203-entry memory cache was never synced. All 6 tools show ✓. The cache has 203 memory entries; 0 were written to any tool. This is data loss without warning.
Suggested Fix
- Return a failure status from
apply_memory_via_llm() when an auth/network error occurs
- Use
✗ (not ✓) in the per-tool output when memory sync was skipped due to error
- Exit with code 1 if any component of sync fails
- Print a clear actionable fix hint:
Run: apc configure --provider anthropic --api-key YOUR_KEY
Tool(s) Affected
All: claude-code, cursor, gemini-cli, github-copilot, openclaw, windsurf
What Happened
Running
apc memory sync --all --yes(orapc sync --all --yes) when the configured LLM API key is invalid produces:What Was Expected
✓success indicator should NOT appear after a failureapc configure --provider anthropic --api-key ...Root Cause
In
src/appliers/base.py,apply_memory_via_llm()catches the exception and returns0(silent skip), thensync_helpers.pycounts "0 memory files" and prints a✓. The warning is printed but then overridden by the success indicator.Impact
A user who runs
apc syncwith an expired or misconfigured API key gets zero feedback that their 203-entry memory cache was never synced. All 6 tools show✓. The cache has 203 memory entries; 0 were written to any tool. This is data loss without warning.Suggested Fix
apply_memory_via_llm()when an auth/network error occurs✗(not✓) in the per-tool output when memory sync was skipped due to errorRun: apc configure --provider anthropic --api-key YOUR_KEY