Skip to content

Fix 409s when uploading files for the first time#18439

Merged
adrinr merged 2 commits intomasterfrom
fix/agent-409s
Apr 1, 2026
Merged

Fix 409s when uploading files for the first time#18439
adrinr merged 2 commits intomasterfrom
fix/agent-409s

Conversation

@adrinr
Copy link
Copy Markdown
Member

@adrinr adrinr commented Apr 1, 2026

Description

When uploading a file into an agent for the first time, we create a gemini store, and we reference it in the agent. Refreshing the agent in the store in order to avoid 409s for this use case.
Note that we don't need this when deleting files, as we are not deleting the gemini store.


Summary by cubic

Fixes 409 conflicts on first-time file uploads by refreshing agents after the upload so the new Gemini store reference is synced. File deletion behavior is unchanged.

  • Bug Fixes
    • AgentsStore.uploadAgentFile now uses runAndRefreshAgents to fetch updated agents after upload, preventing 409s.
    • Added tests in packages/builder/src/stores/portal/agents.spec.ts to ensure upload triggers a refresh and delete does not.

Written for commit c33f6e6. Summary will update on new commits.

@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/s labels Apr 1, 2026
@adrinr adrinr requested a review from Dakuan April 1, 2026 15:20
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@Dakuan Dakuan left a comment

Choose a reason for hiding this comment

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

super duper

@adrinr adrinr merged commit d62b690 into master Apr 1, 2026
34 checks passed
@adrinr adrinr deleted the fix/agent-409s branch April 1, 2026 15:36
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

firestorm Data/Infra/Revenue Team size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants