Skip to content

🐛 Fix Save Resolution failing with hardcoded 'claude' agent fallback#4096

Merged
clubanderson merged 1 commit intomainfrom
fix/save-resolution-agent-fallback
Apr 1, 2026
Merged

🐛 Fix Save Resolution failing with hardcoded 'claude' agent fallback#4096
clubanderson merged 1 commit intomainfrom
fix/save-resolution-agent-fallback

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

SaveResolutionDialog.tsx hardcoded agent: 'claude' when mission.agent was unset. The claude API provider isn't registered in the agent registry (only CLI-based agents like copilot-cli, claude-cli are), so this always fails with "Claude provider not configured - ANTHROPIC_API_KEY not set".

Changed to agent: undefined — the backend's agent selection logic (GetSelectedAgent → default agent) picks whatever provider is actually available.

Fixes #4079

Test plan

  • Run a mission without setting ANTHROPIC_API_KEY → Save Resolution should work using the default agent
  • Run a mission with copilot-cli → Save Resolution should use copilot-cli (not fall back to 'claude')

…4079)

SaveResolutionDialog hardcoded `agent: 'claude'` when mission.agent
was unset. The 'claude' API provider is not registered in the agent
registry (only CLI-based agents are), causing "Claude provider not
configured - ANTHROPIC_API_KEY not set" errors.

Changed to `agent: undefined` so the backend uses its own fallback
logic (session's selected agent → default agent), which always picks
an available provider.

Fixes #4079

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Copilot AI review requested due to automatic review settings April 1, 2026 11:19
@kubestellar-prow kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 1, 2026
@clubanderson clubanderson merged commit a75a4a9 into main Apr 1, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 88cc467
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69ccff5eb5c7870008c9d866
😎 Deploy Preview https://deploy-preview-4096.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow bot deleted the fix/save-resolution-agent-fallback branch April 1, 2026 11:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes “Save Resolution” failures caused by a hardcoded agent: 'claude' fallback in the AI summary generation request, allowing the backend to select an actually-available default agent when mission.agent is unset.

Changes:

  • Removed the hardcoded 'claude' fallback for the WebSocket chat request in SaveResolutionDialog.
  • Ensured the agent field is effectively omitted when mission.agent is not set, deferring selection to backend defaults.

Comment on lines 109 to 116
ws.send(JSON.stringify({
type: 'chat',
id: `summary-${Date.now()}`,
payload: {
prompt: prompt,
sessionId: `resolution-${mission.id}`,
agent: mission.agent || 'claude',
agent: mission.agent || undefined,
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a regression test around the WebSocket request payload in generateAISummary to ensure that when mission.agent is unset/empty the "agent" field is omitted (or otherwise does not default to a non-registered provider). This would prevent reintroducing the previous hardcoded fallback behavior.

Copilot uses AI. Check for mistakes.
@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 0 code suggestion(s) and 1 general comment(s).

Also address these general comments:

  • web/src/components/missions/SaveResolutionDialog.tsx (line 116): Consider adding a regression test around the WebSocket request payload in generateAISummary to ensure that when mission.

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save Resolution Fails with “Claude provider not configured - ANTHROPIC_API_KEY not set” in AI Mission

3 participants