Commit 478c6371f5 for handsontable.com

commit 478c6371f51b27716cec61bb6ff536d206a9ffd2
Author: Szymon Dolnik <42141039+Haxikowy@users.noreply.github.com>
Date:   Wed Nov 25 14:23:10 2026 +0100

    DEV-4193: Fire the execution hooks once for a batch() that writes a cell (#14447) (#14466)

    * DEV-4193: Fire the execution hooks once for a batch() that writes a cell

    * DEV-4193: Add changelog entry for PR #14447

    * DEV-4193: Fire no execution hooks for the page Pagination recomputes on a render

    With pageSize: 'auto' Pagination recomputes its page on every render and
    stored the paged rows in a batchExecution() of its own, so a batch() that
    writes a cell still fired a second cycle of the execution hooks, and a
    render() fired one. That write now goes through
    _batchExecutionWithoutHooks(). A page change a caller asks for still
    fires the hooks.

    The guide says again that other features suspend the execution on their
    own. The changelog entry is dropped: the hooks are new in 19.0, so the
    release notes would list them as both added and fixed.

    * DEV-4193: Fire the execution hooks for a page change made in the render of the recompute

    The silent path covered the whole #refreshUI() call of the per-render recompute,
    so a setPage() a listener made in that render stored the page with no execution
    hooks. The recompute now asks for the silent write with an argument of its own
    call, and the render that follows runs outside it.

    * DEV-4193: Pin the silent batch paths and correct the texts that named a render's autosizing

    Add cases for the two auto-size writes and the three properties of
    _batchExecutionWithoutHooks() that no test covered: the 'batch' operation, the
    forced flush of a nested call, and no forced flush after a throwing callback.

    Comments, AGENTS.md files and the hook docs still said a render's autosizing
    opens a suspension or a Formulas hold. The docs now also say that clearing the
    measured sizes is silent, and that the 'auto' page size recomputes the rows of
    a page on a render with no execution hooks.

    (cherry picked from commit ee1e9d801448ceb0a498c6f4c5a4f50b91eecfc2)

    Co-authored-by: Adrian Dusinkiewicz <155736789+adrianspdev@users.noreply.github.com>

diff --git a/docs/content/guides/optimization/batch-operations/batch-operations.md b/docs/content/guides/optimization/batch-operations/batch-operations.md
index e206cd07b7..212f386b74 100644
--- a/docs/content/guides/optimization/batch-operations/batch-operations.md
+++ b/docs/content/guides/optimization/batch-operations/batch-operations.md
@@ -232,7 +232,8 @@ hot.resumeExecution(); // It updates the cache internally
 When the execution changes from resumed to suspended, Handsontable fires the [`beforeSuspendExecution`](@/api/hooks.md#beforesuspendexecution) and [`afterSuspendExecution`](@/api/hooks.md#aftersuspendexecution) hooks. When it changes back to resumed, Handsontable fires the [`beforeResumeExecution`](@/api/hooks.md#beforeresumeexecution) and [`afterResumeExecution`](@/api/hooks.md#afterresumeexecution) hooks.

 - The hooks fire only on that change. A nested [`suspendExecution()`](@/api/core.md#suspendexecution) or [`resumeExecution()`](@/api/core.md#resumeexecution) call fires nothing.
-- [`batch()`](@/api/core.md#batch) and [`batchExecution()`](@/api/core.md#batchexecution) suspend and resume the execution the same way, so they fire the hooks too. Handsontable also suspends the execution on its own, for example to size columns on a render.
+- [`batch()`](@/api/core.md#batch) and [`batchExecution()`](@/api/core.md#batchexecution) suspend and resume the execution the same way, so they fire the hooks too. The hooks don't fire when Handsontable stores or clears the column widths and row heights it measures. That includes the `clearCache()` method of the [`AutoColumnSize`](@/api/autoColumnSize.md) and [`AutoRowSize`](@/api/autoRowSize.md) plugins.
+- Handsontable also suspends the execution on its own, so the hooks fire for more than your own batches. Filtering, sorting, hiding or trimming rows and columns, collapsing columns or nested rows, and changing the page or the page size all fire them. With the `'auto'` page size, Handsontable also recomputes the rows of the page on each render, for example after the container is resized. That recompute can change the rows the page shows, and it fires no execution hooks.
 - The hooks can't cancel the change. Handsontable ignores their return values. A listener that throws in `beforeSuspendExecution` stops the suspension, and the error reaches the caller.
 - A `beforeSuspendExecution` or `beforeResumeExecution` listener can suspend and resume the execution of the same instance. Those calls belong to the change in progress, so they fire no hooks. If the listener leaves the execution suspended, `beforeResumeExecution` fires again, and `afterResumeExecution` fires, with the call that ends it.

diff --git a/handsontable/AGENTS.md b/handsontable/AGENTS.md
index 6436ff4dfc..8b69b6c81b 100644
--- a/handsontable/AGENTS.md
+++ b/handsontable/AGENTS.md
@@ -97,6 +97,7 @@ Gotcha: Filters `conditionCollection` uses physical indexes, `getDataAtCol()` us
 - **A group's options do NOT compose with a shortcut's own — they are skipped for any key the shortcut already declares.** `Context#addShortcuts(shortcuts, options)` copies each option onto a shortcut only `if (hasOwnProperty(shortcut, key) === false)`. So a shortcut carrying its own `runOnlyIf` silently opts OUT of the group's guard rather than being ANDed with it. That is how `Ctrl`+`Enter` bypassed the `GRID_GROUP` rendered-cells check while every neighbouring arrow key honoured it — the group guard reads like a floor and is not one. When a group-wide invariant must hold, put it inside each overriding shortcut's own `runOnlyIf` too, and verify by pressing the key rather than by reading the group options.
 - **`adjustRowsAndCols()` only ever GROWS the grid; a lowered minimum is given back by `grid.removeSurplusRowsAndCols()`, which `updateSettings` runs just before it (DEV-2206).** Four rules, each with a measured defect behind it. (1) It removes **only** the rows and columns those four options appended: `DataMap` keeps a count of the trailing run each axis ends with (`#trailingFillerRows`, `#trailingFillerColumns`, read through `isTrailingFillerRow()`/`isTrailingFillerColumn()`), raised only by a create carrying `fillsMinimumSize: true` and reset by any insert that lands after the run. **Do not key this on `source === 'auto'`** — `applyChanges()` creates rows and columns with that source for any write past the last one, so a paste's rows would be given back as if an option had added them. A count rather than a set of row objects, because those options always APPEND: the rows they add are the physically last ones, a sort or a move reorders the visual space only, and a count needs no read of `dataSource` (which NestedRows remaps). A new `DataMap` — every `loadData`/`updateData` — starts at zero, and no `data`-in-the-same-call guard is needed, but not because nothing was created yet: the data phase runs `adjustRowsAndCols()` against the already-merged settings, so the new axis is sized to the new values before the removal runs and its surplus comes out 0. NestedRows' hand-built top-level inserts bypass the count, so there a lowering can take the user's new empty row instead of a filler (the count and the data stay right) — a known limit, recorded in `src/plugins/nestedRows/AGENTS.md`. (2) It removes down to what the new values require and no further (`countSurplusTrailingItems`, `core/minimumSizes.ts`): the surplus is `count - max(minimum, filled + spare)`, which can never exceed the empty items at the end, so a row holding data is unreachable. Do **not** also cap it by how much the value was lowered — with the filler gate in (1) that cap can never change the answer, and it under-removes on a grid whose earlier lowering was blocked. (3) **The removal is an ordinary one and the cell meta follows it.** An earlier version skipped `metaManager.removeRow`/`removeColumn` for the `auto` source, to mirror the create — and that silently LOST meta: the rows taken are the last ones on SCREEN, so after a sort a surviving row can sit physically after them, and its meta was left behind at an index the removal had renumbered (comments, `readOnly`, `className`, invalid flags, CustomBorders, MergeCells anchors, all of them). Shifting it also keeps `alter(…, 'auto')` behaving as it always did for callers. The cost is the mirror image, and it is the right trade: out-of-range meta shifts on a lowering but not on a raise. It is still **not** `alter()` — that lowers `fixedRowsBottom` and splices `colHeaders`, and the creation this reverses did neither. (4) The selection is repaired with `Selection#refresh()`, which clamps, not `shiftRows()`/`shiftColumns()`, which move a layer by the removed amount — right in the middle, wrong at the end — and only when a layer reached the removed part, because `refresh()` re-fires the selection hooks. It runs under the `shift` selection source, the one `alter()`'s removals use, because `refresh()` otherwise marks `refresh`, which is not in `afterSetRangeEnd`'s no-scroll list — a plain `updateSettings()` call would then scroll the viewport (and a window-scrolled page) to the clamped selection. An editor open on a removed row or column is closed without saving, but only once the removal has actually happened: a `beforeRemoveRow` veto would otherwise throw away what the user is typing into a row that then stays. **Deliberate limit:** while `maxRows`/`maxCols` hides part of an axis, that axis is left alone — the removal cannot address a capped row, so acting on the capped count took one out of the MIDDLE of the data set. A **trimming** map (Filters, TrimRows, a NestedRows collapse) is deliberately NOT skipped: the requirement is read from the visible rows, exactly the way `adjustRowsAndCols()` reads it when it fills, so a lowering gives back the visible surplus and a filler the trim hides stays. Measured both ways — with data rows trimmed the result equals a grid built with the lower value, and the grow side has always done the mirror image (with rows trimmed, `minRows` grows the source past the value and an untrim keeps the extra rows, with no `updateSettings()` involved). Neither side runs again when the trim changes; that is the known limit. Pagination hides rather than trims, so it does not change the count at all. Two rules about *when* it may read the grid at all. **Nothing is counted until the lowered check has passed**, the way `adjustRowsAndCols()` reads `minRows` before it reads `countRows()`: `updateSettings()` also runs from a plugin's `enablePlugin()`, and plugins are enabled BEFORE the first data load, so `datamap` is still undefined there and any count throws — `multiColumnSorting` turning itself off next to `columnSorting` is the in-tree caller that does it. And **`Infinity` is a real value, not a broken one**: `createRow`/`createCol` stop at `maxRows`/`maxCols`, so `minRows: Infinity` with a cap set is a working grid that fills to the cap, and `toSize()` therefore keeps it rather than folding it to `0` — folding it made a later finite value look like a raise and skipped the removal. Pinned by `src/__tests__/core/minimumSizesDecrease.unit.js` and the four `src/__tests__/settings/min*.spec.js` decrease specs.
 - **A row can be longer than the grid, and a column created at the end is a block insert at the journal's index, never a push.** The grid width is `getInitialColumnCount()`: the first row's length, or the length of `dataSchema` or `columns` when one is set. `DataMap#createCol` takes the physical end from `columnIndexMapper.getNumberOfIndexes()`, not from `countSourceCols()`, which is only the first row's length. It inserts every new `null` of a create as one block at `firstNewPhysicalColumnIndex` in every row (`#insertColumnsIntoDataSource`), and a row shorter than that index gets them at its end. A longer row keeps its values in order, with the nulls in front of the values past the grid width, and the grid does not widen (DEV-485). The undo journal records `insertColumns` at that same physical index and replays it with `alter()` by index, so the data and the journal must agree. An earlier rule pushed the first column to the end of the row and spliced the rest at a fixed position, which put a `null` in the middle of a longer row with `minSpareCols`, and made undo remove real values. Pushing every column to the row end is not the fix either, because undo would then remove the values at the journal's index (a `trimRows` longer row lost two values). A value past the grid width stays out of a column added at the end, so a user who relied on it showing in the new column sees an empty one. Known limit: a row shorter than the insertion point is padded with `null` values and the journal does not record its length, so undo leaves the padding. No value is lost. A grid with no rows still gets one `[null]` row per column created at its end. Pinned by `src/__tests__/core/minSpareColsRaggedData.unit.js`.
+- **The execution hooks report the batches an application or a feature makes, not core's own bookkeeping (DEV-4193).** `suspendExecution()`, `batchExecution()` and `batch()` fire `beforeSuspendExecution`, `afterSuspendExecution`, `beforeResumeExecution`, and `afterResumeExecution` when the counter leaves and returns to 0. `batch()` resumes the execution BEFORE it resumes rendering, so anything the closing render batches is a suspension of its own and fires a second cycle. A write that only caches a measurement (AutoColumnSize and AutoRowSize storing sizes, or clearing them through the public `clearCache()` and `clearCacheByRange()`), and the page Pagination recomputes on each render with `pageSize: 'auto'`, therefore goes through the private `_batchExecutionWithoutHooks()`: the same counter, mapper suspension, forced flush and `'batch'` operation, with no hooks. Silence is per call, not ambient: a suspension nested in the callback fires nothing because the counter is above 0, and a batch a `cacheUpdated` listener makes during the silent resume fires its own full cycle. So `isExecutionSuspended()` can be `true` with no `afterSuspendExecution` fired; a plugin that keeps state per suspension (the Formulas hold) must not assume the pair. Do not use it for a batch a caller asked for that changes what the grid shows (filtering, hiding, sorting, trimming, a page change). Pinned by `src/__tests__/core/executionSuspendHooks.unit.js`.
 - **Every mutator runs inside an operation, or undo records it wrong.** The core entry points (`setDataAtCell`, `alter`, `setCellMeta`, `batch`, `batchExecution`, `spliceCellsMeta`, ...) open one through `operationScope` (`src/core/operationScope.ts`), and plugins wrap each public mutator in `this.runOperation(name, fn)`. The outermost operation is one undo step; nested ones join it. A new mutator that writes data, cell meta or an index map outside an operation turns each inner call into a step of its own, and a write that must not become a step runs under `operationScope.suppress()`. An asynchronous continuation keeps the recording context of the call that started it through `operationScope.hold()` (a validator's answer, NestedRows' deferred re-collapse). The rules, the journal and the restore order: `src/plugins/undoRedo/AGENTS.md`.
 - **A write to a row that does not exist yet is keyed by the physical index the row WILL take, not by its visual one (DEV-155).** A write past the last row is validated BEFORE `applyChanges()` creates the row, and the meta it reads and writes needs some physical row. A created row is appended after the last SOURCE record (`rowIndexMapper.getNumberOfIndexes() + k`), and `metaManager.createRow(null, n)` leaves meta stored beyond the dataset where it is. With a trimming map the source holds more records than the grid shows, so the old `physical = visual` guess wrote the validation result, and fed `populateFromArray()`'s `readOnly`/`skipRowOnPaste` reads and the `valueSetter` read, from a trimmed or unrelated record. `getCellMetaOfChange()` in `core.ts` resolves it for those three write-path reads, and `validateChanges()` drops the `valid` flag of a validated row that was never created (`maxRows` clamp, `allowInsertRow: false`), or a row appended later would inherit a mark nothing validated. **Do not move the resolution into `Core#getCellMeta`, `getCellMetaTransient` or `setCellMeta`.** A row index past the last visual row is also how a caller names a TRIMMED record by its physical index (ColumnSummary's `isLockedSummaryCell` relies on it, pinned by `columnSummary/__tests__/readOnlyLock.unit.js`), so the public fallback cannot tell a pending row from a trimmed record. The cost: a `beforeValidate`/`afterValidate` listener that calls `hot.getCellMeta(row, col)` for a created row still gets the trimmed record, not the object the validator wrote to - use `this` in the validator. Both counts come from the index mapper, so a long paste stays O(1) per cell (`countSourceRows()` walks the tree under NestedRows). The column axis is not covered: `toPhysicalColumn()` still falls back to the visual index. Pinned by `src/__tests__/core/validateChangesTrimmedRows.unit.js` and `tests/e2e/paste-validation-trim-rows.spec.ts`.
 - **`Core#_applySettingsAndData(settings, data, source)` is the one private path that replaces settings and data together, and it runs them in three phases.** Configure (settings merged, plugins enable or update while `_isDataWorkDeferred()` answers `true`, and `applySettings()` skips the data phase, the late `columns` pass, the `cell` option, `afterCellMetaReset`, the `min*` sizing and the render), load (`applyLoadData()` with the new configuration in force), data ready (the held-back meta phase, then the source-data validators once, then each enabled plugin's `onDataReady()` in priority order, then one render, with rendering suspended for the whole call). The deferral is an explicit `defersDataWork` argument of `applySettings()`, which then returns a closure over its meta phase (`applyMetaPhase()`) instead of running it, plus a closure `dataWorkPhase` (`'configure'`, `'data'`, `'meta'` while the held meta phases run, or `null`) saved and restored around every call, never a boolean reset to `false`. `_isHeldMetaPhaseRunning()` answers for `'meta'` only, so a plugin that skips work the load already did (Formulas' resync) skips it for the call's own meta phase and not for a full `updateSettings()` a listener makes later in the call, which runs with the step set back to `'data'`. An update made in the configure step that carries `data` warns, because the call's load replaces it. The optional `cellOptionMetas` argument puts `cell`-option meta back by physical index in place of applying `settings.cell` by its coordinates, which a reordering or trimming map of the new settings changes during the load; `settings.cell` is still stored as given. The optional `keptCellMetas` argument puts back the meta set through `setCellMeta()` and the invalid marks, by physical index, before the `cell` option (a restated `cell` entry wins) and before `afterCellMetaReset`; entries past the loaded data or on a `min*` filler row or column are dropped. Details in `src/plugins/sheetsBar/AGENTS.md`. A public `updateSettings()` made in the configure step (ColumnSorting's `enablePlugin()` does on a sorting-plugin conflict) is deferred the same way, and its meta closure is queued (`heldMetaPhases`) and run after the outer one: applied in full it padded the departing rows to the arriving `min*` values, and one shared slot let it overwrite the outer meta phase. An update made later (an `afterLoadData` listener) applies in full. Three traps: the first-run source validators are skipped in phase 1 too, because a grid being built has no data map until the load (core's own init pass runs them); `replaceData()` skips its own validator run while `_isDataWorkDeferred()` answers `true`, because a `columns` function reaches the column meta only in the meta phase, and validating in the load blanked arriving values under the departing sheet's rules (for the same reason a `columns` value the early pass cannot apply, `null` or a function, resets the column meta BEFORE the load on this path, or the load validates and renders the arriving data with the departing columns' types); and the phase is restored in a `finally`, so a listener that throws cannot leave later updates deferred (a listener that destroys the grid in the configure step, `afterUpdateSettings` included, ends the call there: no load, no meta phase, and the `finally` resumes no render on the destroyed instance), while every plugin drops the work it recorded for the `onDataReady()` pass (`BasePlugin#dropDeferredDataWork()`), so that work cannot run on a later call against other data. `_isDataLoadPending()` answers `true` only in the configure step: work that needs the load itself (NestedRows, Formulas binding a sheet, MergeCells' pass) asks it, because `_isDataWorkDeferred()` stays `true` after the load and an enable from an `afterLoadData` listener then waited for a load that had already run. A grid still being built (`firstRun`) skips the call's validator run, because core's own init pass runs them. `_replaceInitPassSettings()` (callable from `beforeInit` only) lets a caller that applied settings there replace the hook callbacks and `cell` entries that init pass applies, so they are applied once by the pass instead of being undone by it and re-applied through `updateSettings()`. Only the SheetsBar plugin calls it, so `updateSettings()`, `loadData()` and the wrappers behave as before. `_addSettingsFilter(filter)` adds a function to a list, run in the order added, that reads every later `updateSettings()` and `_applySettingsAndData()` payload and the values `_replaceInitPassSettings()` hands the init pass (never the settings the grid is created with), and returns the payload core applies; `_removeSettingsFilter(filter)` takes it out again. A filter returns the payload unchanged or a new object, and never changes the caller's. When `updateSettings()` gets a new, empty object back, the call stops there: no plugin update, no `afterUpdateSettings`, no render. `afterUpdateSettings` otherwise receives the filtered payload. Two callers add one. The SheetsBar plugin, while it is enabled, keeps the visible sheet's own settings over grid-level values. The Angular wrapper, before `init()`, turns the component renderers, editors and boolean validators of any payload into what core reads, and runs in Angular's zone the hook functions its `settings` input declares (a sheet's own included; an array of callbacks runs as given), because a sheet's own settings reach core through the bar, never through the wrapper's `settings` input. A hook passed to the instance itself (`hot.updateSettings({ afterChange: fn })`, `updateSheetSettings()`) stays exactly as given, so `getSettings()` returns it and `removeHook()` removes it. A filter must run on all three paths: the bar applies a switch through `_applySettingsAndData()`, and the opening sheet's hooks through `_replaceInitPassSettings()`, so a filter on `updateSettings()` alone missed both. A grid with no filter applies every payload exactly as before. The plugin side of the contract is in `src/plugins/base/AGENTS.md`.
diff --git a/handsontable/src/__tests__/core/executionSuspendHooks.unit.js b/handsontable/src/__tests__/core/executionSuspendHooks.unit.js
index 729a313479..8765705eb7 100644
--- a/handsontable/src/__tests__/core/executionSuspendHooks.unit.js
+++ b/handsontable/src/__tests__/core/executionSuspendHooks.unit.js
@@ -2,7 +2,7 @@ import Core from 'handsontable/core';
 import { Hooks } from 'handsontable/core/hooks';
 import { registerCellType, TextCellType } from 'handsontable/cellTypes';
 import { registerRenderer, baseRenderer, textRenderer } from 'handsontable/renderers';
-import { registerPlugin, AutoColumnSize, AutoRowSize } from 'handsontable/plugins';
+import { registerPlugin, AutoColumnSize, AutoRowSize, MergeCells, Pagination } from 'handsontable/plugins';
 import { safeBatch } from 'handsontable/utils/safeBatch';
 import { rootInstanceSymbol } from 'handsontable/utils/rootInstance';
 import { TEST_LICENSE_KEY } from '../../../test/helpers/licenseKey';
@@ -12,6 +12,8 @@ registerRenderer(baseRenderer);
 registerRenderer(textRenderer);
 registerPlugin(AutoColumnSize);
 registerPlugin(AutoRowSize);
+registerPlugin(MergeCells);
+registerPlugin(Pagination);

 const EXECUTION_HOOKS = [
   'beforeSuspendExecution',
@@ -274,14 +276,19 @@ describe('execution suspend hooks', () => {
       expect(log).toEqual([...SUSPEND_PAIR, 'callback', ...RESUME_PAIR]);
     });

-    it('should also fire for the suspensions Handsontable makes itself, after the batch resumed', () => {
-      // AutoColumnSize and AutoRowSize measure in `batchExecution()` on the render that `batch()` ends with.
-      hot = createHot(container, {
+    it.each([
+      ['the default settings', {}],
+      ['AutoColumnSize and AutoRowSize', {
         autoColumnSize: true,
         autoRowSize: true,
         renderAllRows: true,
         renderAllColumns: true,
-      });
+      }],
+      ['Pagination with an auto page size', { autoRowSize: true, pagination: { pageSize: 'auto' } }],
+    ])('should fire each pair once for a batch that writes a cell, with %s', (name, settings) => {
+      // AutoColumnSize and AutoRowSize store the sizes they measure on the render that `batch()` ends with,
+      // and Pagination stores the rows of an auto-sized page there.
+      hot = createHot(container, settings);

       const log = recordExecutionHooks(hot);

@@ -291,14 +298,240 @@ describe('execution suspend hooks', () => {
         hot.setDataAtCell(1, 0, 'x');
       });

-      expect(log.slice(0, 5)).toEqual([...SUSPEND_PAIR, 'callback', ...RESUME_PAIR]);
+      expect(log).toEqual([...SUSPEND_PAIR, 'callback', ...RESUME_PAIR]);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it.each([
+      ['a cell write', instance => instance.setDataAtCell(0, 0, 'a much longer value than before')],
+      ['a render', instance => instance.render()],
+      ['AutoColumnSize#clearCache', instance => instance.getPlugin('autoColumnSize').clearCache([0])],
+      ['AutoRowSize#clearCache', instance => instance.getPlugin('autoRowSize').clearCache([0])],
+      ['AutoRowSize#clearCacheByRange', instance => instance.getPlugin('autoRowSize').clearCacheByRange(0)],
+    ])('should fire nothing for the sizes the auto-size plugins store on %s', (name, run) => {
+      hot = createHot(container, {
+        autoColumnSize: true,
+        autoRowSize: true,
+        renderAllRows: true,
+        renderAllColumns: true,
+      });
+
+      const log = recordExecutionHooks(hot);
+
+      run(hot);
+
+      expect(log).toEqual([]);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it('should fire nothing for the width AutoColumnSize grows in place after a cell write', () => {
+      hot = createHot(container, { autoColumnSize: true });
+
+      const plugin = hot.getPlugin('autoColumnSize');
+
+      // jsdom measures every width as 0, so the probe of a changed cell never finds a value wider than the
+      // cached width. Only the probe measures with the headers off.
+      jest.spyOn(plugin.ghostTable, 'getWidths').mockImplementation((callback) => {
+        const width = plugin.ghostTable.getSetting('useHeaders') ? 100 : 500;
+
+        plugin.ghostTable.columns.forEach(column => callback(column.col, width));
+      });
+
+      const setValueAtIndex = jest.spyOn(plugin.columnWidthsMap, 'setValueAtIndex');
+      const log = recordExecutionHooks(hot);
+
+      hot.setDataAtCell(0, 0, 'a much longer value than before');
+
+      expect(setValueAtIndex).toHaveBeenCalledWith(0, 500);
+      expect(log).toEqual([]);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it('should fire each pair once for a batch that hides the row a merged block is drawn on', () => {
+      hot = createHot(container, {
+        autoRowSize: true,
+        mergeCells: [{ row: 0, col: 0, rowspan: 2, colspan: 1 }],
+      });
+
+      const hidingMap = hot.rowIndexMapper.createAndRegisterIndexMap('testHiding', 'hiding', false);
+      const log = recordExecutionHooks(hot);
+
+      // The block moves to its second row, so AutoRowSize drops the heights of both rows on the render.
+      hot.batch(() => {
+        hidingMap.setValueAtIndex(0, true);
+      });
+
+      expect(log).toEqual(FULL_CYCLE);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it.each([
+      ['a cell write', instance => instance.setDataAtCell(0, 0, 'a much longer value than before')],
+      ['a render', instance => instance.render()],
+    ])('should fire nothing for the page Pagination recomputes with an auto page size on %s', (name, run) => {
+      hot = createHot(container, { autoRowSize: true, pagination: { pageSize: 'auto' } });
+
+      const log = recordExecutionHooks(hot);
+
+      run(hot);
+
+      expect(log).toEqual([]);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it.each([
+      ['a fixed page size', { pagination: { pageSize: 2 } }],
+      ['an auto page size', { autoRowSize: true, pagination: { pageSize: 'auto' } }],
+    ])('should fire each pair once for a page change, with %s', (name, settings) => {
+      hot = createHot(container, settings);
+
+      const log = recordExecutionHooks(hot);
+
+      hot.getPlugin('pagination').setPage(1);
+
+      expect(log).toEqual(FULL_CYCLE);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it('should fire each pair once for a page change a listener makes in the render of the recompute', () => {
+      hot = createHot(container, { autoRowSize: true, pagination: { pageSize: 'auto' } });
+
+      const log = recordExecutionHooks(hot);
+      let isPageChanged = false;
+
+      // The recompute renders the grid, so the first `afterRender` of a render comes from inside it.
+      hot.addHook('afterRender', () => {
+        if (!isPageChanged) {
+          isPageChanged = true;
+          log.push('setPage');
+          hot.getPlugin('pagination').setPage(1);
+        }
+      });
+
+      hot.render();
+
+      expect(log).toEqual(['setPage', ...FULL_CYCLE]);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it('should suspend the execution and apply the callback\'s writes in a silent batch', () => {
+      hot = createHot(container, { autoColumnSize: true });
+
+      const plugin = hot.getPlugin('autoColumnSize');
+      const log = recordExecutionHooks(hot);
+
+      hot._batchExecutionWithoutHooks(() => {
+        expect(hot.isExecutionSuspended()).toBe(true);
+        plugin.columnWidthsMap.setValueAtIndex(0, 123);
+      }, true);
+
+      expect(plugin.columnWidthsMap.getValueAtIndex(0)).toBe(123);
+      expect(log).toEqual([]);
+    });
+
+    it('should run the callback of a silent batch as a `batch` operation', () => {
+      hot = createHot(container);
+
+      let operationName;
+
+      hot._batchExecutionWithoutHooks(() => {
+        operationName = hot._getOperationScope().current()?.name;
+      });
+
+      expect(operationName).toBe('batch');
+      expect(hot._getOperationScope().current()).toBe(null);
+    });
+
+    it('should update the index cache on the resume of a nested silent batch only when forced', () => {
+      hot = createHot(container);
+
+      const cacheUpdated = jest.fn();
+
+      hot.columnIndexMapper.addLocalHook('cacheUpdated', cacheUpdated);
+      hot.suspendExecution();
+
+      hot._batchExecutionWithoutHooks(() => hot.columnIndexMapper.setIndexesSequence([1, 0]));
+
+      expect(cacheUpdated).toHaveBeenCalledTimes(0);
+
+      hot._batchExecutionWithoutHooks(() => hot.columnIndexMapper.setIndexesSequence([0, 1]), true);
+
+      expect(cacheUpdated).toHaveBeenCalledTimes(1);
+      expect(hot.isExecutionSuspended()).toBe(true);
+
+      hot.resumeExecution();
+    });
+
+    it('should not force the index cache update of a nested silent batch whose callback throws', () => {
+      hot = createHot(container);
+
+      const cacheUpdated = jest.fn();
+
+      hot.columnIndexMapper.addLocalHook('cacheUpdated', cacheUpdated);
+      hot.suspendExecution();
+
+      expect(() => {
+        hot._batchExecutionWithoutHooks(() => {
+          hot.columnIndexMapper.setIndexesSequence([1, 0]);
+
+          throw new Error('callback error');
+        }, true);
+      }).toThrow('callback error');
+
+      expect(cacheUpdated).toHaveBeenCalledTimes(0);
+      expect(hot.isExecutionSuspended()).toBe(true);
+
+      hot.resumeExecution();
+
+      expect(cacheUpdated).toHaveBeenCalledTimes(1);
+    });
+
+    it('should fire a full cycle for a batch a cache update listener makes while a silent batch resumes', () => {
+      hot = createHot(container);
+
+      const log = recordExecutionHooks(hot);
+      let batched = false;
+
+      hot.columnIndexMapper.addLocalHook('cacheUpdated', () => {
+        if (!batched) {
+          batched = true;
+          hot.batch(() => log.push('listener batch'));
+        }
+      });
+
+      hot._batchExecutionWithoutHooks(() => {
+        hot.batchExecution(() => log.push('nested batch'));
+        hot.columnIndexMapper.setIndexesSequence([1, 0]);
+      }, true);

-      const trailing = log.slice(5);
+      expect(log).toEqual(['nested batch', ...SUSPEND_PAIR, 'listener batch', ...RESUME_PAIR]);
+      expect(hot.isExecutionSuspended()).toBe(false);
+    });
+
+    it('should fire nothing for a silent batch made inside a batch, and resume with the outer one', () => {
+      hot = createHot(container);
+
+      const log = recordExecutionHooks(hot);
+
+      hot.batch(() => {
+        hot._batchExecutionWithoutHooks(() => log.push('silent'), true);
+
+        expect(hot.isExecutionSuspended()).toBe(true);
+      });

-      // The render adds whole cycles, each one a suspension of its own (3 with these two plugins in jsdom).
-      expect(trailing.length).toBeGreaterThan(0);
-      expect(trailing.length % FULL_CYCLE.length).toBe(0);
-      expect(trailing).toEqual(Array.from({ length: trailing.length / 4 }, () => FULL_CYCLE).flat());
+      expect(log).toEqual([...SUSPEND_PAIR, 'silent', ...RESUME_PAIR]);
+    });
+
+    it('should resume the execution when the callback of a silent batch throws', () => {
+      hot = createHot(container);
+
+      const log = recordExecutionHooks(hot);
+
+      expect(() => hot._batchExecutionWithoutHooks(() => {
+        throw new Error('boom');
+      })).toThrow('boom');
+
+      expect(log).toEqual([]);
       expect(hot.isExecutionSuspended()).toBe(false);
     });

diff --git a/handsontable/src/core.ts b/handsontable/src/core.ts
index f34b33903c..c947383699 100644
--- a/handsontable/src/core.ts
+++ b/handsontable/src/core.ts
@@ -5692,11 +5692,23 @@ export default function Core(
    * ```
    */
   this.suspendExecution = function(this: HotInstance & CoreInternals) {
+    suspendExecution.call(this, true);
+  };
+
+  /**
+   * Suspends the execution, the way {@link Core#suspendExecution} does.
+   *
+   * @private
+   * @param {boolean} firesHooks `false` for a suspension Handsontable makes for its own bookkeeping (see
+   * `_batchExecutionWithoutHooks()`), which fires no execution hooks.
+   */
+  function suspendExecution(this: HotInstance & CoreInternals, firesHooks: boolean) {
     // The hooks report the state change, so a nested call fires nothing. A grid being destroyed fires
     // nothing either: its teardown runs in a `batchExecution()` whose resume comes after `afterDestroy`.
     // A call a `before*` listener makes fires nothing: the counter is still 0 while that listener runs, so
     // it would fire the hook again and recurse.
-    const changesState = this.executionSuspendedCounter === 0 && !isBeingDestroyed && !isRunningBeforeExecutionHook;
+    const changesState = firesHooks && this.executionSuspendedCounter === 0 && !isBeingDestroyed &&
+      !isRunningBeforeExecutionHook;

     if (changesState) {
       isRunningBeforeExecutionHook = true;
@@ -5728,7 +5740,7 @@ export default function Core(
         throw error;
       }
     }
-  };
+  }

   /**
    * Resumes the execution process. In combination with the {@link Core#suspendExecution}
@@ -5772,9 +5784,20 @@ export default function Core(
    * ```
    */
   this.resumeExecution = function(this: HotInstance & CoreInternals, forceFlushChanges = false) {
+    resumeExecution.call(this, forceFlushChanges, true);
+  };
+
+  /**
+   * Resumes the execution, the way {@link Core#resumeExecution} does.
+   *
+   * @private
+   * @param {boolean} forceFlushChanges If `true`, the index cache is updated also by a nested call.
+   * @param {boolean} firesHooks `false` for the resume of a suspension that fired no execution hooks.
+   */
+  function resumeExecution(this: HotInstance & CoreInternals, forceFlushChanges: boolean, firesHooks: boolean) {
     const nextValue = this.executionSuspendedCounter - 1;
     // Only the resume that brings the counter back to 0 changes the state (see `suspendExecution`).
-    const changesState = nextValue === 0 && !isBeingDestroyed && !isRunningBeforeExecutionHook;
+    const changesState = firesHooks && nextValue === 0 && !isBeingDestroyed && !isRunningBeforeExecutionHook;

     // Each step runs in a `finally`, so a throwing listener (of these hooks or of a cache update) cannot
     // keep the grid or a mapper suspended, and `afterResumeExecution` (where a plugin releases what it held
@@ -5809,7 +5832,7 @@ export default function Core(
         }
       }
     }
-  };
+  }

   /**
    * The method aggregates multi-line API calls into a callback and postpones the
@@ -5878,6 +5901,42 @@ export default function Core(
     });
   };

+  /**
+   * Runs the callback with the execution suspended, as {@link Core#batchExecution} does, and fires no
+   * execution hooks. It is for the bookkeeping Handsontable does on its own, such as storing the sizes
+   * AutoColumnSize and AutoRowSize measure on a render: the execution hooks report the batches an
+   * application or a feature makes, so a `batch()` that writes a cell fires them once, not once more for
+   * each size the render that follows stores.
+   *
+   * A suspension made inside the callback is nested, so it fires nothing. One a listener of the index cache
+   * update makes while this call resumes is a suspension of its own and fires the hooks.
+   *
+   * @private
+   * @param {Function} wrappedOperations Batched operations wrapped in a function.
+   * @param {boolean} [forceFlushChanges=false] If `true`, the index cache is updated also by a nested call.
+   * @returns {*} Returns result from the wrappedOperations callback.
+   */
+  this._batchExecutionWithoutHooks = function<T>(wrappedOperations: () => T, forceFlushChanges = false): T {
+    const executionState = instance as HotInstance & CoreInternals;
+
+    // An operation, like `batchExecution()`: UndoRedo reads the batch as one `'batch'` entry.
+    return operationScope.run('batch', undefined, () => {
+      suspendExecution.call(executionState, false);
+
+      let completed = false;
+
+      try {
+        const result = wrappedOperations();
+
+        completed = true;
+
+        return result;
+      } finally {
+        resumeExecution.call(executionState, completed && forceFlushChanges, false);
+      }
+    });
+  };
+
   /**
    * It batches the rendering process and index recalculations. The method aggregates
    * multi-line API calls into a callback and postpones the table rendering process
diff --git a/handsontable/src/core/hooks/AGENTS.md b/handsontable/src/core/hooks/AGENTS.md
index 1d32ee2784..69b3233bf8 100644
--- a/handsontable/src/core/hooks/AGENTS.md
+++ b/handsontable/src/core/hooks/AGENTS.md
@@ -42,7 +42,9 @@ This directory holds the `Hooks` singleton, the per-instance `HooksBucket`, and
   from `beforeResumeExecution` or from a cache update still updates the counter, resumes both mappers and fires
   `afterResumeExecution` (a later throw replaces an earlier one); and `batch()`, `batchExecution()` and
   `safeBatch()` keep `resumeRender()` and `resumeExecution()` in `finally` blocks around the suspend. Renders
-  suspend the execution too (AutoColumnSize, AutoRowSize), so a listener that renders re-enters the hooks.
+  suspend the execution too (AutoColumnSize, AutoRowSize, Pagination's `'auto'` page size), but through
+  `_batchExecutionWithoutHooks()`, which fires none of the four, so a listener that renders does not re-enter
+  the hooks (DEV-4193). A batch a render listener makes still does.
   A suspend or resume a `before*` listener makes on the same grid fires no hooks
   (`isRunningBeforeExecutionHook` in `core.ts`): the counter is still unchanged while that listener runs, so
   the call would fire the hook again and recurse. `resumeExecution()` therefore decrements the LIVE counter
diff --git a/handsontable/src/core/hooks/constants.ts b/handsontable/src/core/hooks/constants.ts
index 14a2e73655..6242847087 100644
--- a/handsontable/src/core/hooks/constants.ts
+++ b/handsontable/src/core/hooks/constants.ts
@@ -2279,7 +2279,9 @@ export const REGISTERED_HOOKS = [
   /**
    * Fired by {@link Core#suspendExecution} before it suspends the execution (the index cache updates).
    * [`batch()`](@/api/core.md#batch) and [`batchExecution()`](@/api/core.md#batchexecution) suspend the
-   * execution the same way, and so does Handsontable itself (for example, to size columns on a render).
+   * execution the same way. The hook does not fire when Handsontable stores or clears the column widths and
+   * row heights it measures, or recomputes the rows of a page with the `'auto'` page size on a render (for
+   * example, after the container is resized).
    *
    * The hook fires only when the execution changes from resumed to suspended: a nested call fires nothing.
    * Its return value cannot cancel the suspension, but a listener that throws stops it, and the error
@@ -2331,7 +2333,9 @@ export const REGISTERED_HOOKS = [
   /**
    * Fired by {@link Core#suspendExecution} after it suspends the execution (the index cache updates).
    * [`batch()`](@/api/core.md#batch) and [`batchExecution()`](@/api/core.md#batchexecution) suspend the
-   * execution the same way, and so does Handsontable itself (for example, to size columns on a render).
+   * execution the same way. The hook does not fire when Handsontable stores or clears the column widths and
+   * row heights it measures, or recomputes the rows of a page with the `'auto'` page size on a render (for
+   * example, after the container is resized).
    *
    * The hook fires only when the execution changes from resumed to suspended: a nested call fires nothing.
    * When a listener throws, the execution is resumed (the `beforeResumeExecution` and
@@ -2380,7 +2384,9 @@ export const REGISTERED_HOOKS = [
   /**
    * Fired by {@link Core#resumeExecution} before it resumes the execution and updates the index cache.
    * [`batch()`](@/api/core.md#batch) and [`batchExecution()`](@/api/core.md#batchexecution) resume the
-   * execution the same way, and so does Handsontable itself (for example, to size columns on a render).
+   * execution the same way. The hook does not fire when Handsontable stores or clears the column widths and
+   * row heights it measures, or recomputes the rows of a page with the `'auto'` page size on a render (for
+   * example, after the container is resized).
    *
    * The hook fires only when the execution changes from suspended to resumed: a nested call, a forced
    * nested call, and a call while the execution is not suspended fire nothing. It cannot cancel the resume.
@@ -2435,14 +2441,15 @@ export const REGISTERED_HOOKS = [
    * Fired by {@link Core#resumeExecution} after it resumes the execution and updates the index cache, so
    * the index changes made while the execution was suspended are already applied.
    * [`batch()`](@/api/core.md#batch) and [`batchExecution()`](@/api/core.md#batchexecution) resume the
-   * execution the same way, and so does Handsontable itself (for example, to size columns on a render).
+   * execution the same way. The hook does not fire when Handsontable stores or clears the column widths and
+   * row heights it measures, or recomputes the rows of a page with the `'auto'` page size on a render (for
+   * example, after the container is resized).
    * `batch()` resumes rendering after this hook.
    *
    * The hook fires only when the execution changes from suspended to resumed: a nested call, a forced
    * nested call, and a call while the execution is not suspended fire nothing. It fires even when a
    * `beforeResumeExecution` listener or the index cache update throws. The hook does not fire while the
-   * instance is being destroyed. A listener that suspends the execution again, directly or through a render,
-   * starts a new cycle, which fires all four hooks again, this one included.
+   * instance is being destroyed. A listener that suspends the execution again starts a new cycle, which fires all four hooks again, this one included.
    *
    * @event Hooks#afterResumeExecution
    * @since 19.0.0
diff --git a/handsontable/src/core/types.ts b/handsontable/src/core/types.ts
index ecea158ace..25e206dfed 100644
--- a/handsontable/src/core/types.ts
+++ b/handsontable/src/core/types.ts
@@ -343,6 +343,7 @@ export interface HotInstance {
     keptCellMetas?: KeptCellMetas | null
   ): void;
   _isDataWorkDeferred(): boolean;
+  _batchExecutionWithoutHooks<T>(wrappedOperations: () => T, forceFlushChanges?: boolean): T;
   _isDataLoadPending(): boolean;
   _runInPluginLifecyclePass<T>(callback: () => T): T;
   _isHeldMetaPhaseRunning(): boolean;
diff --git a/handsontable/src/plugins/autoColumnSize/AGENTS.md b/handsontable/src/plugins/autoColumnSize/AGENTS.md
index ce2bf6b4b1..424f6accf9 100644
--- a/handsontable/src/plugins/autoColumnSize/AGENTS.md
+++ b/handsontable/src/plugins/autoColumnSize/AGENTS.md
@@ -413,6 +413,20 @@ the page. Measured from a step, the columns would come out of empty labels again
 fixed. Every ready step now runs before the `init` hook, so `init` is the point where the other plugins'
 state is in place and the first render has not run yet. AutoRowSize keeps its listener for the same reason.

+## Size writes fire no execution hooks (DEV-4193)
+
+Every batched write to `columnWidthsMap` goes through `this.hot._batchExecutionWithoutHooks()`, never through
+`batchExecution()`. Both methods suspend the execution, open a `'batch'` operation, and flush the index cache
+on a forced resume. Only `batchExecution()` fires `beforeSuspendExecution`, `afterSuspendExecution`,
+`beforeResumeExecution`, and `afterResumeExecution`. The render that ends a `batch()` runs after the batch
+resumed the execution, so a size write made with `batchExecution()` there fired a second full cycle of the
+hooks for one `batch()` call, and one more cycle on every render. The hooks report the batches an application
+or a feature makes, so a new size write uses the silent method too.
+
+The public `clearCache()` with a list of indexes batch the same way, so they are silent as well. The
+full `clearCache()` calls `columnWidthsMap.clear()` with no batch at all: it suspends nothing and fires nothing.
+Pinned by `src/__tests__/core/executionSuspendHooks.unit.js`.
+
 ## Where to look next

 - Row counterpart: `../autoRowSize/AGENTS.md`. Row *header* widths: `../autoRowHeaderSize/AGENTS.md`.
diff --git a/handsontable/src/plugins/autoColumnSize/autoColumnSize.ts b/handsontable/src/plugins/autoColumnSize/autoColumnSize.ts
index e4fe6349b3..c3f20ddc22 100644
--- a/handsontable/src/plugins/autoColumnSize/autoColumnSize.ts
+++ b/handsontable/src/plugins/autoColumnSize/autoColumnSize.ts
@@ -1258,7 +1258,7 @@ export class AutoColumnSize extends BasePlugin {
     }

     if (growths.size > 0) {
-      this.hot.batchExecution(() => {
+      this.hot._batchExecutionWithoutHooks(() => {
         growths.forEach((width, visualColumn) => {
           this.columnWidthsMap.setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), width);
         });
@@ -1424,7 +1424,7 @@ export class AutoColumnSize extends BasePlugin {
     let stylesChanged = false;
     const changedColumns: number[] = [];

-    this.hot.batchExecution(() => {
+    this.hot._batchExecutionWithoutHooks(() => {
       this.ghostTable.getWidths((visualColumn: number, width: number) => {
         const physicalColumn = this.hot.toPhysicalColumn(visualColumn);

@@ -1676,7 +1676,7 @@ export class AutoColumnSize extends BasePlugin {
    */
   clearCache(physicalColumns?: number[]): void {
     if (Array.isArray(physicalColumns)) {
-      this.hot.batchExecution(() => {
+      this.hot._batchExecutionWithoutHooks(() => {
         physicalColumns.forEach((physicalIndex) => {
           this.columnWidthsMap.setValueAtIndex(physicalIndex, null);
           this.#columnSamplesCache.delete(physicalIndex);
diff --git a/handsontable/src/plugins/autoRowSize/AGENTS.md b/handsontable/src/plugins/autoRowSize/AGENTS.md
index bbfaf38546..28ee59ee8f 100644
--- a/handsontable/src/plugins/autoRowSize/AGENTS.md
+++ b/handsontable/src/plugins/autoRowSize/AGENTS.md
@@ -288,6 +288,20 @@ the page. Measured from a step, the rows and the header height would be measured
 the `init` hook, so `init` is the point where the other plugins' state is in place and the first render has
 not run yet. AutoColumnSize keeps its listener for the same reason.

+## Size writes fire no execution hooks (DEV-4193)
+
+Every batched write to `rowHeightsMap` goes through `this.hot._batchExecutionWithoutHooks()`, never through
+`batchExecution()`. Both methods suspend the execution, open a `'batch'` operation, and flush the index cache
+on a forced resume. Only `batchExecution()` fires `beforeSuspendExecution`, `afterSuspendExecution`,
+`beforeResumeExecution`, and `afterResumeExecution`. The render that ends a `batch()` runs after the batch
+resumed the execution, so a size write made with `batchExecution()` there fired a second full cycle of the
+hooks for one `batch()` call, and one more cycle on every render. The hooks report the batches an application
+or a feature makes, so a new size write uses the silent method too.
+
+The public `clearCache()` and `clearCacheByRange()` with a list of indexes batch the same way, so they are silent as well. The
+full `clearCache()` calls `rowHeightsMap.clear()` with no batch at all: it suspends nothing and fires nothing.
+Pinned by `src/__tests__/core/executionSuspendHooks.unit.js`.
+
 ## Where to look next

 - The shared pipeline, sampling rules and refresh-queue behavior: `../autoColumnSize/AGENTS.md`.
diff --git a/handsontable/src/plugins/autoRowSize/autoRowSize.ts b/handsontable/src/plugins/autoRowSize/autoRowSize.ts
index ca5c51c1d1..29c8017074 100644
--- a/handsontable/src/plugins/autoRowSize/autoRowSize.ts
+++ b/handsontable/src/plugins/autoRowSize/autoRowSize.ts
@@ -647,7 +647,7 @@ export class AutoRowSize extends BasePlugin {
     });

     if (this.ghostTable.rows.length) {
-      this.hot.batchExecution(() => {
+      this.hot._batchExecutionWithoutHooks(() => {
         this.ghostTable.getHeights((row: number, height: number) => {
           if (row < 0) {
             this.headerHeight = Math.round(height);
@@ -925,7 +925,7 @@ export class AutoRowSize extends BasePlugin {
     const lastVisibleRow = this.getLastVisibleRow();
     const rowsToQueue: number[] = [];

-    this.hot.batchExecution(() => {
+    this.hot._batchExecutionWithoutHooks(() => {
       physicalRows.forEach((physicalRow) => {
         this.rowHeightsMap.setValueAtIndex(physicalRow, null);
       });
@@ -1019,7 +1019,7 @@ export class AutoRowSize extends BasePlugin {
     });

     if (this.ghostTable.rows.length) {
-      this.hot.batchExecution(() => {
+      this.hot._batchExecutionWithoutHooks(() => {
         this.ghostTable.getHeights((visualRow: number, height: number) => {
           const physicalRow = this.hot.toPhysicalRow(visualRow);

@@ -1164,7 +1164,7 @@ export class AutoRowSize extends BasePlugin {
     this.headerHeight = null;

     if (Array.isArray(physicalRows)) {
-      this.hot.batchExecution(() => {
+      this.hot._batchExecutionWithoutHooks(() => {
         physicalRows.forEach((physicalIndex) => {
           this.rowHeightsMap.setValueAtIndex(physicalIndex, null);
         });
@@ -1194,7 +1194,7 @@ export class AutoRowSize extends BasePlugin {
     const { from, to } = typeof range === 'number' ? { from: range, to: range } : range;
     const clearedRows: number[] = [];

-    this.hot.batchExecution(() => {
+    this.hot._batchExecutionWithoutHooks(() => {
       rangeEach(Math.min(from, to), Math.max(from, to), (row) => {
         this.rowHeightsMap.setValueAtIndex(row, null);
         clearedRows.push(row);
diff --git a/handsontable/src/plugins/formulas/AGENTS.md b/handsontable/src/plugins/formulas/AGENTS.md
index f055e1aaa5..4a324ce8f4 100644
--- a/handsontable/src/plugins/formulas/AGENTS.md
+++ b/handsontable/src/plugins/formulas/AGENTS.md
@@ -2122,9 +2122,11 @@ With `formulas.batchEvaluation: true`, the plugin writes a grid makes while its
 every path below takes the branch it took before: no hold exists, so `runEngineBatch()` is `engine.batch(fn)`.

 - **The hold is per engine** (`engine/evaluationHold.ts`, a module-level `WeakMap`). A grid joins it on
-  `afterSuspendExecution` (the setting is read there, live) and leaves on `afterResumeExecution`. Every render
-  suspends the execution (AutoColumnSize, AutoRowSize), so join and leave must stay a `Set` add and delete: the
-  engine listeners are attached at the first suspension the plugin makes, not on join.
+  `afterSuspendExecution` (the setting is read there, live) and leaves on `afterResumeExecution`. Join and
+  leave stay a `Set` add and delete: the engine listeners are attached at the first suspension the plugin
+  makes, not on join. The size writes AutoColumnSize and AutoRowSize make on a render suspend the execution
+  through `Core#_batchExecutionWithoutHooks()`, which fires no execution hooks (DEV-4193), so no grid joins
+  the hold for them: `isExecutionSuspended()` can be `true` with no holder.
 - **Lazy suspension.** The engine is suspended at the first plugin engine write made while the hold has a
   holder (`beginHeldEngineWrite()`), so a suspension that writes only index maps (filters, hiding, autosizing)
   never touches the engine. Any grid's write joins an owned suspension, a grid that did not opt in included.
@@ -2230,7 +2232,7 @@ every path below takes the branch it took before: no hold exists, so `runEngineB
   resume that may never come (a grid that suspends across an `await`). Without the setting they are validated at
   once. Pinned by "validates the dependents of its writes when it leaves".
 - **Release.** The grid leaves first, then the flush and the settle run in one write scope, so the grids paint
-  after the validation. A paint can suspend a grid's execution again (its render's autosizing), so a release
+  after the validation. A paint can suspend a grid's execution again (a batch a render listener makes), so a release
   re-entered during the plugin's own resume (`resuming`) leaves the end to the outer one. When the host holds the
   engine suspended, the hold ends and validates at the host's resume, unless a grid holds the engine again before
   then: `joinEvaluationHold()` clears `onSettled`, so that grid's release ends it. Left set, the host's resume
diff --git a/handsontable/src/plugins/formulas/engine/evaluationHold.ts b/handsontable/src/plugins/formulas/engine/evaluationHold.ts
index ead5e02f7b..a11e4bad31 100644
--- a/handsontable/src/plugins/formulas/engine/evaluationHold.ts
+++ b/handsontable/src/plugins/formulas/engine/evaluationHold.ts
@@ -55,7 +55,7 @@ interface EvaluationHold {
   heldWriteKind: HeldWriteKind | null;
   /**
    * Whether the engine listeners are attached. They are attached at the first suspension the plugin makes,
-   * so a hold with no engine write (every render's internal `batchExecution()`) costs no engine call.
+   * so a hold with no engine write (a filter, a hidden row, a page change) costs no engine call.
    */
   listening: boolean;
   /**
diff --git a/handsontable/src/plugins/formulas/formulas.ts b/handsontable/src/plugins/formulas/formulas.ts
index 24a6ebdbe3..10dd175a73 100644
--- a/handsontable/src/plugins/formulas/formulas.ts
+++ b/handsontable/src/plugins/formulas/formulas.ts
@@ -2450,7 +2450,7 @@ export class Formulas extends BasePlugin {
   /**
    * `afterSuspendExecution` hook callback. With `batchEvaluation` on, the grid holds the engine's
    * recalculation: the engine is suspended at the first engine write the plugin makes from now on, not here,
-   * so a suspension that writes only index maps (every render's autosizing, a filter, a hidden row) never
+   * so a suspension that writes only index maps (a filter, a hidden row, a page change) never
    * touches the engine.
    */
   #onAfterSuspendExecution = () => {
@@ -2469,8 +2469,8 @@ export class Formulas extends BasePlugin {
   /**
    * Takes this grid out of the hold on its engine. When it was the last grid holding it, the held writes are
    * recalculated, once, and their dependents are validated, once each. Both run in one plugin write scope, so
-   * the grids paint after the validation, and a paint that suspends a grid's execution again (its render's
-   * autosizing) starts a hold of its own. When the host holds the engine suspended itself, the hold ends and
+   * the grids paint after the validation, and a paint that suspends a grid's execution again (a batch a render
+   * listener makes) starts a hold of its own. When the host holds the engine suspended itself, the hold ends and
    * the dependents are validated when the host resumes it.
    *
    * @param {boolean} [leaving=false] `true` when the grid is being destroyed: its own cells are not validated,
@@ -2579,7 +2579,7 @@ export class Formulas extends BasePlugin {
       }
     });

-    // Most holds end with nothing to validate (every render's autosizing), so the registry is not read for them.
+    // Most holds end with nothing to validate (a filter, a hidden row), so the registry is not read for them.
     if (dependentsBySheet.size === 0) {
       return;
     }
diff --git a/handsontable/src/plugins/pagination/AGENTS.md b/handsontable/src/plugins/pagination/AGENTS.md
index 6a3eb4e82d..b46daf2ee3 100644
--- a/handsontable/src/plugins/pagination/AGENTS.md
+++ b/handsontable/src/plugins/pagination/AGENTS.md
@@ -18,6 +18,18 @@ A `'hiding'` map affects the **renderable** tier, so paginated-away rows keep th
 (The DeepWiki page groups filtering with hiding and pagination; it is wrong. See
 `../../../.ai/INDEX-MAPPING.md`.)

+## The per-render recompute fires no execution hooks (DEV-4193)
+
+`#computeAndApplyState()` stores the map inside `batchExecution(…, true)`, which fires the four execution
+hooks, as a page change should. With `pageSize: 'auto'` the same method also runs from `afterViewRender` on
+every render, and there the write goes through core's private `_batchExecutionWithoutHooks()`: a
+`batch()` that writes a cell otherwise fired a second cycle on its closing render, and a plain `render()`
+fired one. `#onAfterViewRender` asks for that path with `#computeAndApplyState(false)`, an argument of that
+one call. Do not turn it into a flag held around the `hot.render()` that follows, and do not key it on
+`#internalRenderCall`: listeners run inside that render, and `#internalRenderCall` stays set until the next
+`afterViewRender`, so a `setPage()` made there would go silent. Pinned by the Pagination cases in
+`src/__tests__/core/executionSuspendHooks.unit.js`.
+
 ## Hard conflicts, declared at module scope in this file

 ```js
diff --git a/handsontable/src/plugins/pagination/pagination.ts b/handsontable/src/plugins/pagination/pagination.ts
index 5bc22b8267..e1d79fed9a 100644
--- a/handsontable/src/plugins/pagination/pagination.ts
+++ b/handsontable/src/plugins/pagination/pagination.ts
@@ -1064,8 +1064,11 @@ export class Pagination extends BasePlugin {

   /**
    * Applies the current pagination state to the internal index mapper and updates the UI.
+   *
+   * @param {boolean} [firesExecutionHooks=true] `false` for the recompute an `'auto'` page size does on each
+   * render, which stores the paged rows with no execution hooks fired.
    */
-  #computeAndApplyState() {
+  #computeAndApplyState(firesExecutionHooks = true) {
     this.#internalExecutionCall = true;
     this.#pagedRowsMap?.clear();

@@ -1133,9 +1136,17 @@ export class Pagination extends BasePlugin {
     }

     if (!externalPagedMode && renderableIndexes.length > 0) {
-      this.hot.batchExecution(() => {
+      const storePagedRows = () => {
         renderableIndexes.forEach((index: number) => this.#pagedRowsMap?.setValueAtIndex(index, true));
-      }, true);
+      };
+
+      // The recompute an `'auto'` page size does on each render is bookkeeping, like the sizes the auto-size
+      // plugins store there, so it fires no execution hooks. A page change a caller asks for still does.
+      if (firesExecutionHooks) {
+        this.hot.batchExecution(storePagedRows, true);
+      } else {
+        this.hot._batchExecutionWithoutHooks(storePagedRows, true);
+      }
     } else if (!externalPagedMode) {
       this.hot.rowIndexMapper.updateCache(true);
     }
@@ -1385,7 +1396,10 @@ export class Pagination extends BasePlugin {
     }

     this.#internalRenderCall = true;
-    this.#refreshUI();
+    // Only the recompute is silent. The render that follows runs listeners, and a page change one of them
+    // asks for fires the execution hooks.
+    this.#computeAndApplyState(false);
+    this.hot.render();
   };

   /**
diff --git a/handsontable/src/plugins/undoRedo/AGENTS.md b/handsontable/src/plugins/undoRedo/AGENTS.md
index 6515410445..acff404959 100644
--- a/handsontable/src/plugins/undoRedo/AGENTS.md
+++ b/handsontable/src/plugins/undoRedo/AGENTS.md
@@ -430,7 +430,7 @@ stack hook pair, and with no `afterUndo`/`afterRedo`.
 - A settings update that changes the row count while a transaction that already journaled a change
   is pending (a join host) is folded into that step's "after" state instead of dropping the history.
 - Every transaction that joins a host adds its names to the step's `operations` and `sources`, a
-  no-op one included (an AutoRowSize `batchExecution()` during a scroll reads as a `'batch'` entry).
+  no-op one included (an AutoRowSize `_batchExecutionWithoutHooks()` during a scroll reads as a `'batch'` entry).
   Only a capture per settle could tell a no-op from a hide, which changes no journal either.

 ## Testing