← Back to PRs

#9520: fix: ignore slack already_reacted

by bolismauro open 2026-02-05 09:24 View on GitHub →
agents stale
## Summary - Treat Slack `already_reacted` errors as no-ops in reaction tool flow. - Add test coverage for `already_reacted` handling. ## Testing - `pnpm build` - `pnpm check` (failed: `src/discord/monitor/allow-list.ts` type errors unrelated to this PR) - `pnpm test` (not run; blocked by `pnpm check`) ## AI Assistance - AI-assisted: yes. - Prompts + session log: https://gist.github.com/bolismauro/a49bdf102a8abc6a1bb4192f287d49a4 - I understand the code changes and verified local tests as noted above. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR makes Slack reaction adds idempotent by treating Slack `already_reacted` failures as a no-op in the `react` tool flow (`handleSlackAction`), and adds a unit test covering the `already_reacted` behavior. The change is localized to the Slack agent tool wrapper (`src/agents/tools/slack-actions.ts`) which chooses tokens/options and dispatches to the underlying Slack action helpers in `src/slack/actions.js`. <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable but has a concrete read-auth bug in existing code paths touched by review. - The `already_reacted` handling itself looks correct and is covered by a test, but `listPins`/`memberInfo` currently gate passing read options on `writeOpts`, which will break token/account propagation for reads in some configurations; that should be fixed before merge to avoid regressions in Slack read operations. - src/agents/tools/slack-actions.ts <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs