Investigate why Excel format_cells needs more tool calls than write_cells
Session from pi-for-excel-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Click a segment to jump to that moment
2msession
0interventions
GOAL
Figure out why the agent's formatting tool calls are far less batched/efficient than its write_cells calls, and whether the tooling should be made more robust to reduce redundant formatting calls.
- +0Prompt · +0The agent needs way more tool calls for formatting than for editing (write_cells). Is this something we should make more robust?
- +0mAgent did · +0mExplored repo structure and read DECISIONS.md, system-prompt.ts, format-cells.ts, write-cells.ts, and registry.ts to understand current tool design and prior decisions around formatting behavior.
- +0mAgent did · +0mSearched the codebase for existing batching/multi-range support and tool-call grouping UI, then listed the test suite to see what formatting/write behavior is already covered.
- +1mAgent did · +1mRead with-workbook-coordinator.ts, coordinator.ts, and conventions/defaults.ts to understand how mutating tool calls are serialized and where formatting conventions are defined.
- +2mOutcome · +2mAgent concluded formatting is worth hardening: the trace showed 9 formatting calls vs one batched write, format_cells already supports comma-separated multi-ranges but prompt guidance doesn't enforce batching, and some formatting actions (e.g. hide_gridlines) are overreach.
VERDICT
Next time I'd start the prompt by pointing straight at format-cells.ts and the multi-range support so the agent doesn't have to rediscover it through grep. No correction was needed here — it was a pure investigation and the agent's read-through of the coordinator, registry, and conventions files did the work of surfacing that batching already exists but isn't enforced in the prompt.