What 'Already Fixed' means
When Coolhand proposes an optimization—such as a prompt refinement, cost reduction, or error fix—it continuously tracks your connected repository. If your engineering team resolves the issue independently by merging a pull request into your default branch, Coolhand identifies the existing solution.
Once Coolhand confirms that your codebase already contains a fix:
- The change suggestion status updates to "Already Fixed": On your Coolhand dashboard, the change suggestion displays the Already Fixed badge.
- Coolhand links directly to your merged pull request: The change suggestion card includes a link to the specific pull request merged in your repository (for example, "Already fixed by #42"), allowing your team to review the code change that resolved the issue.
- Coolhand closes its own pull request: If Coolhand had previously opened an automated pull request for that change suggestion, it posts an explanatory comment and closes the pull request automatically.
- The parent optimization is completed as "Fixed by client": The optimization moves from open to completed, recording Fixed by client as its completion source.
Why Coolhand automatically closes its pull request
When your team merges your own fix, leaving an automated pull request open creates review clutter and risks merging duplicate or conflicting code.
To keep your repository tidy and save engineering review time, Coolhand:
- Adds a comment to the automated pull request explaining that an existing fix was detected in your default branch and citing the relevant pull request number.
- Closes the pull request automatically.
If someone manually reopens Coolhand's closed pull request on GitHub, the suggestion remains marked as Already Fixed in Coolhand. Coolhand will not alter the status unless that pull request is actually merged.
When Coolhand checks for existing fixes
Coolhand checks for existing fixes at several points in the optimization lifecycle:
- Before proposing an error fix: When Coolhand investigates recurring runtime errors, it checks recently merged pull requests in your repository before generating a code change. If your team merged a fix around or after the error occurred, Coolhand marks the optimization as resolved immediately without opening an unnecessary pull request.
- When a pull request merges into your default branch: Whenever you merge a pull request, Coolhand inspects the changes against active suggestions in your project to see if the underlying issue has been resolved.
- During routine background sweeps: Coolhand periodically reviews open suggestions and their associated pull requests against recent repository commits to catch any fixes merged outside the immediate webhook event window.
How 'Already Fixed' compares to other completion statuses
Coolhand tracks multiple ways an optimization can reach completion:
| Completion Status | What It Means |
|---|---|
| Fixed by client ("Already Fixed") | Your team resolved the problem directly by merging your own pull request or commit into your default branch. Coolhand detected the fix and retired its suggestion. |
| Merged Change Suggestion | Your team reviewed, approved, and merged the automated pull request opened by Coolhand. |
| Implementation Detected | Coolhand detected via incoming production telemetry that your prompt template text changed to match the optimization plan, even without a linked pull request. |
| Marked as Completed | A member of your team manually clicked Mark as Completed on the optimization details page. |
Supported source control integrations
Existing fix detection relies on repository integrations that allow Coolhand to inspect merged pull requests on the default branch:
- GitHub (.com): Fully supported via the Coolhand GitHub App. See Connect GitHub to Coolhand for setup instructions.
- GitHub Enterprise Server: Fully supported via repository connections and webhooks. See Connect GitHub Enterprise Server to Coolhand.
- GitLab: Currently, automated detection of existing merged pull requests is not supported for GitLab connections. You can still merge Coolhand's suggestions directly or mark optimizations as completed manually. See Connect GitLab to Coolhand.