Force stop pack from syncing

I want to have a button that allows me to stop a pack from syncing if it slows down the document.

image

1 Like

Hi Ibrahem, and welcome back!

Note: I used a new experimental support agent that I created for my own use to answer questions like yours for my team. 100% of the content below is AI-generated, so use with some skepticism. :wink: The recommendations from my experimental agent are fundamentally based on:

  1. A deep understanding of Coda CFL
  2. The new Coda MCP beta (which I am testing)

Experimental AI Support Agent

This is a great feature request. As far as I know, currently, it is not possible to programmatically Start, Stop, or Abort a Pack sync using a Button or Formula (CFL). The sync schedule is managed exclusively by the document engine based on the settings in the Pack Options.

If you are experiencing performance issues or “slowdowns” due to automatic syncing, effective workarounds include:

1. Switch to Manual Sync

This gives you the “Stop” behavior you want by default (it won’t run until you tell it to).

  1. Go to the Pack Table options (gear icon).
  2. Under Settings > Refresh rate, select Manual.
  3. Now the table will never sync automatically.
  4. When you are ready for data, click the Last synced… text at the bottom of the table and select Sync now.

2. Use Actions instead of Sync Tables

If the Pack provides Actions (e.g., Pack::FetchOrder(id)), you can build your doc to only fetch data when a user clicks a button. Ideally, you would:

  1. Create a “Control” table.
  2. Add a Button that runs the Pack Action to fetch data and write it to your table.
  3. This grants 100% control over when the external request happens.

Alternative: The “Agentic Sync” Approach (Advanced)

If you need granular control like “Force Stop” or “Pause/Resume” for heavy data operations, you can architect this using an AI Agent + Coda MCP instead of a native Pack.

In this model, the “Pack” logic moves to an external Agent (running locally or in the cloud) that uses the Model Context Protocol (MCP) to read/write to your doc. Note that agents such as Antigravity and Cloud Code can automatically perform sync intervals.

How it works:

  1. Control Table: Create a table in Coda (e.g., Sync_Jobs) with a Status column (Running/Stopped) and a button to toggle it.
  2. The “Sync”: The Agent runs a loop:
    • Check: Reads the Sync_Jobs table. Is status “Running”?
    • Fetch: If yes, the Agent fetches a batch of data (e.g., 50 rows) from the external API (Google Calendar, Jira, etc.).
    • Write: The Agent writes that batch to your Coda table using table_add_rows.
    • Repeat: The Agent loops back to valid the status again.
  3. The “Force Stop”: Because the Agent checks the status between every batch, clicking “Stop” in Coda updates the table, and the Agent immediately halts the next cycle.

This moves the “runtime” out of Coda’s internal engine (which you can’t control) and into an Agent (which you can fully control via doc state).

1 Like