You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
post-merge hook does not appear to run in UI #22476
I have hooks set up in post-merge and post-checkout to update a workspace based on new files arriving.
It's good to know when it succeeds, but vital to know when it fails (basically an inconsistent workspace).
The dialog shows up when switching between branches (though only on failure, fair enough).
But it doesn't show up from pull or merge or update from master
As a trivial example, this hook does seem to run in the background, but there's no evidence of it failing to the end user:
Thanks for the detailed report! This looks like a bug in how Desktop handles hook failures during pull/merge operations. The post-checkout hook correctly surfaces failures in a UI dialog, but post-merge hook failures are silently swallowed — this inconsistency seems like an oversight in the hooks support that shipped in 3.5.x. I'm suggesting bug and priority-3 (affects users relying on post-merge hooks for workspace integrity, but core pull/merge operations still work and the hook does execute). No duplicates found — the general hooks tracking issue (#21501) is closed as completed, making this a specific gap report.
Hitting this too, from a slightly different angle, and I'd like to help fix it.
I maintain a small tool that keeps encrypted secrets in a repo. Its post-merge and post-rewrite hooks keep each person's decrypted copies in sync after a pull. Most of the time that just works, but sometimes the hook needs the user to do something (two people changed the same secret, a key is missing), and the hook's output is the only way to tell them. In Desktop that output never shows up. On a failure it gets swallowed, as described above, and on success it's dropped too.
It looks like most of the plumbing is already there. hooks-proxy.ts collects terminalOutput for every hook, and onHookProgress already reports finished and failed. It's just that post-merge, post-rewrite and friends are in ignoredOnFailureHooks, so they never reach the UI. Keeping them out of the "Hook failed" dialog makes sense, since the pull already happened and there's nothing to abort. But they still need somewhere to show up.
What I have in mind is a small per-hook status list after any operation that ran hooks (commit, pull, merge, rebase, checkout):
Pull origin · 2 hooks ran ×
✅ post-merge 0.4s ▸
❗ post-rewrite 0.2s ▾
│ two people changed config/app.env; run `sync --merge` to see both
│ post-rewrite hook failed with code 1 after 0.20s
A green check or a red exclamation per hook, with its name and how long it took.
Click a row to expand or collapse its output, reusing the terminal output view the commit progress and "Hook failed" dialogs already use.
The whole thing is dismissible. To keep it quiet, it only appears when a hook failed or actually printed something.
Blocking hooks (pre-commit, pre-push, …) keep the existing dialog. This only covers the ones that can't stop the operation.
That fixes this issue (post-merge failures become visible without a modal), and it also makes successful hooks that report something useful visible, which a lot of setups rely on (dependency installs after checkout, workspace syncs like the one above).
If that direction sounds OK to you, I'm happy to put up a PR. Roughly: pass the output and exit code through onHookProgress for every hook, keep the last run's results per repository in the repository state cache, and render the list in the changes sidebar near the commit progress. Happy to adjust if you'd rather it live somewhere else.
Activity
desktop-triage commentedon Jul 8, 2026
Thanks for the detailed report! This looks like a bug in how Desktop handles hook failures during pull/merge operations. The
post-checkouthook correctly surfaces failures in a UI dialog, butpost-mergehook failures are silently swallowed — this inconsistency seems like an oversight in the hooks support that shipped in 3.5.x. I'm suggestingbugandpriority-3(affects users relying on post-merge hooks for workspace integrity, but core pull/merge operations still work and the hook does execute). No duplicates found — the general hooks tracking issue (#21501) is closed as completed, making this a specific gap report.shreeve commentedon Sep 28, 2026
Hitting this too, from a slightly different angle, and I'd like to help fix it.
I maintain a small tool that keeps encrypted secrets in a repo. Its post-merge and post-rewrite hooks keep each person's decrypted copies in sync after a pull. Most of the time that just works, but sometimes the hook needs the user to do something (two people changed the same secret, a key is missing), and the hook's output is the only way to tell them. In Desktop that output never shows up. On a failure it gets swallowed, as described above, and on success it's dropped too.
It looks like most of the plumbing is already there.
hooks-proxy.tscollectsterminalOutputfor every hook, andonHookProgressalready reportsfinishedandfailed. It's just that post-merge, post-rewrite and friends are inignoredOnFailureHooks, so they never reach the UI. Keeping them out of the "Hook failed" dialog makes sense, since the pull already happened and there's nothing to abort. But they still need somewhere to show up.What I have in mind is a small per-hook status list after any operation that ran hooks (commit, pull, merge, rebase, checkout):
That fixes this issue (post-merge failures become visible without a modal), and it also makes successful hooks that report something useful visible, which a lot of setups rely on (dependency installs after checkout, workspace syncs like the one above).
If that direction sounds OK to you, I'm happy to put up a PR. Roughly: pass the output and exit code through
onHookProgressfor every hook, keep the last run's results per repository in the repository state cache, and render the list in the changes sidebar near the commit progress. Happy to adjust if you'd rather it live somewhere else.Show hook results and confirm pushes to a renamed default branch