diff --git a/src/auto_commit_service/tray/local_agent.py b/src/auto_commit_service/tray/local_agent.py index 2fbca69..436a1ca 100644 --- a/src/auto_commit_service/tray/local_agent.py +++ b/src/auto_commit_service/tray/local_agent.py @@ -345,7 +345,8 @@ class LocalCommitAgent: f"Diverged {repo_name}: {ahead}↑ {behind}↓ — invoking claude-code for recovery" ) - if _invoke_claude_recovery(repo_path, repo_name, upstream, ahead, behind): + claude_ok = _invoke_claude_recovery(repo_path, repo_name, upstream, ahead, behind) + if claude_ok: ahead2, behind2 = _ahead_behind(repo_path, upstream) if ahead2 == 0 and behind2 == 0: logger.info(f"Claude resolved {repo_name} cleanly") @@ -357,7 +358,14 @@ class LocalCommitAgent: return except Exception as e: logger.error(f"Claude rebased {repo_name} but push failed: {e}") + logger.warning( + f"Claude exited clean but {repo_name} still diverged: {ahead2}↑ {behind2}↓ " + f"— marking stalled (likely bailed on semantic conflicts)" + ) stall_entry.update(ahead=ahead2, behind=behind2, reason="claude_partial") + else: + logger.warning(f"Claude could not recover {repo_name} — marking stalled") + stall_entry["reason"] = "claude_failed" result.stalled_repos.append(stall_entry)