Skip to content

fix(copilot): run workflow fixes#1040

Merged
Sg312 merged 4 commits intostagingfrom
fix/copilot-run
Aug 20, 2025
Merged

fix(copilot): run workflow fixes#1040
Sg312 merged 4 commits intostagingfrom
fix/copilot-run

Conversation

@Sg312
Copy link
Copy Markdown
Collaborator

@Sg312 Sg312 commented Aug 20, 2025

Summary

Fixes skip in run workflow

Type of Change

  • Bug fix

Testing

How has this been tested? What should reviewers focus on?

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Aug 20, 2025 3:06am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 20, 2025 3:06am

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes a critical bug in the copilot workflow system where skipping tools wasn't properly notifying the agent, causing workflows to hang indefinitely. The changes standardize the data structure for tool rejections across the system and add comprehensive debugging capabilities.

The core fix addresses two main issues: First, it ensures that when users skip copilot tools (particularly server tools), the agent receives proper completion notifications via the /api/copilot/tools/complete endpoint. This prevents the agent from waiting indefinitely for tool responses. Second, it standardizes the rejection data structure from { confirmationMessage } to { status: 'rejected', message } across multiple components (base-tool.ts, inline-tool-call.tsx, and tool-confirmation.tsx).

Additionally, the PR adds extensive diagnostic logging specifically for the set_environment_variables method throughout the copilot system. These logs use '[SEV]' prefixes and track the complete execution flow from client-side execution through API completion. The PR also includes a Next.js configuration update to allow Google Drive images (lh3.googleusercontent.com) and removes concurrent execution from auth token tests to improve test stability.

These changes integrate with the existing copilot architecture by ensuring proper communication between the frontend copilot interface and the backend agent system, maintaining the workflow execution pipeline's reliability.

Confidence score: 3/5

  • This PR addresses a real bug but introduces potential issues with duplicate notifications and extensive debugging code that should be temporary
  • Score reflects concerns about the duplicate notification approach in tool-confirmation.tsx and unregistered handler issues in client-utils.ts
  • Pay close attention to lib/copilot/tools/tool-confirmation.tsx and lib/copilot/tools/client-tools/client-utils.ts for potential runtime issues

8 files reviewed, 3 comments

Edit Code Review Bot Settings | Greptile

Comment thread apps/sim/lib/copilot/tools/tool-confirmation.tsx
Comment thread apps/sim/lib/copilot/tools/tool-confirmation.tsx
Comment thread apps/sim/lib/copilot/tools/client-tools/client-utils.ts
@Sg312 Sg312 merged commit fbebd8f into staging Aug 20, 2025
4 of 5 checks passed
@vercel vercel Bot temporarily deployed to Preview – sim August 20, 2025 03:08 Inactive
Sg312 added a commit that referenced this pull request Aug 20, 2025
aadamgough pushed a commit that referenced this pull request Aug 20, 2025
* Test

* Lint

* Fix tests

* Fixes
@waleedlatif1 waleedlatif1 deleted the fix/copilot-run branch August 24, 2025 08: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