Skip to content
DocsLimits

PluginsEarly

Limits

The time, size and count limits every plugin runs inside.

From the plugin interface of gr 0.2.16 (API 0.1, 0.2, 0.3). gr plugin api limits prints it on your machine.

Past a soft limit a plugin gets a warning; past the hard limit the call fails or the handler is stopped. The time budgets and memory can be raised for one plugin up to the cap, by its plugin.toml's [limits] or by the person with gr plugin config --limit.

Time

BudgetCoversSoftHardCap
loadtransform, compile, run the top level250 ms1,000 ms2,000 ms
unloadthe unload handler100 ms
handlercommand, act, pick16 ms500 ms2,000 ms
viewa view's tree16 ms250 ms1,000 ms
rowsrows and picker entries; soft is the first answer200 ms2,000 ms5,000 ms
backgroundevents, timers and promise continuations, a slice each50 ms500 ms2,000 ms

Size and count

LimitCoversHardCap
calls_per_eventcalls back per event: a warning at soft, calls.over at hard Warns at 50.1,000
calls_in_flightcalls an instance has in the daemon at once; the host holds the rest16
exec_at_onceexec.run running at once, a plugin2
fetch_at_oncenet.fetch running at once, a plugin4
memory_mba plugin's host process, sampled every 100 ms on Linux while it runs code and every second at rest256 MB1024 MB
builtin_alloc_mbone allocation by a built-in (repeat, padStart, typed arrays, JSON.parse); over it throws script.size64 MB
store_bytes$.store, a plugin1 MB
state_bytes$.state, an instance4 MB
message_bytesone message on the host's pipes, encoded; over it the call fails result.too_large8 MB
fs_read_bytesfs.read, unless maxBytes says more Warns at 1 MB.4 MB
exec_msan exec.run30,000 ms
exec_output_bytesan exec.run's output each way, after encoding (control bytes count six times)1 MB
exec_memory_mban exec.run's program1024 MB
fetch_msa net.fetch30,000 ms
fetch_body_bytesa net.fetch's body5 MB
fetch_redirectsa net.fetch's redirects, each checked again5
timer_interval_msthe least interval of a timer Warns at 100 ms.
timerslive timers, a plugin64
idle_unload_msan instance with nothing visible, subscribed or timed600,000 ms
hold_mskeys typed after a key bound to plugin code are held this long at most ([gred] plugins_hold_ms, 0 to 500) Warns at 100 ms.500 ms
picker_entriesa picker's entries, and when live Warns at 500.10,000
badge_set_nodesnodes in one badge set100,000
agent_sendsagents.send a plugin makes in a minute20
agent_startsagents a plugin starts in ten minutes; only the person raises it, in [plugins.<name>.limits] agent_starts330
agent_text_bytesthe text of one agents.send, one agents.start's prompt, or one attach of text, which holds no control character but newlines and tabs64 KB
transcript_blocksthe blocks one agents.transcript answers; soft when limit is not said Warns at 100.1,000
transcript_block_bytesthe text of one block of a transcript; longer is cut4 KB
transcript_bytesthe text of one agents.transcript's answer; the oldest blocks past it are left out256 KB
clipboard_bytesthe text of one clipboard.write1 MB
terminalsterminals a plugin has open at once4
editsthe edits of one edit command1,000
edit_bytesthe text one edit command inserts1 MB
docs_linesthe lines one docs.lines answers5,000
document_changes_bytesthe text the changes of one document.changed carry; past it they are left out64 KB
menusthe [[menus]] entries one manifest adds to the menu at one place; past it the manifest is refused (contribution.value)8
toolsthe tools one manifest offers agents16
tool_description_charsa tool's description, what an agent reads to decide to call it, and each of its properties' descriptions1,000
tool_propertiesthe properties of a tool's [tools.input]32
tool_input_bytesthe input of one tool call, as JSON1 MB
tool_answer_byteswhat one tool call answers: its text, or its json as encoded; over it the call fails result.too_large64 KB
tool_wait_mshow long an agent's tool call waits for its answer, the plugin's loading included; past it the call fails tool.timeout and a late answer is dropped30,000 ms
mcp_serversthe MCP servers one manifest names in [[mcp]]4
mcp_toolsthe tools one MCP server offers agents; those it lists past it are left out, and the plugin's log says so64
mcp_memory_mban MCP server's process tree, sampled as a host's is; past it the server is stopped and off for the session. Only the person raises it, in [plugins.<name>.limits] mcp_memory_mb512 MB4096 MB
mcp_idle_msan MCP server with no call for this long stops; its tools stay offered, and the next call starts it again600,000 ms
mcp_start_msan MCP server's start, from its process to its tools listed; past it the start fails mcp.unavailable60,000 ms
agent_kindsthe agent kinds one manifest adds in [[agents]]. An agent kind is an ACP agent the plugin names, which a person may start beside Claude Code and Codex: [[agents]] id = "<plugin>.<name>" (in the plugin's one set of ids, and the harness name its agents carry), title (at most 40 characters, never what one of Graphide's own agents is called), command (a program [allow] exec names, its path recorded at approval), args, and probe (the program whose presence on the PATH agents start with says the agent is installed, when that is not the command; never run). It is offered only while the plugin is approved and switched on with exec:<command> granted, and it runs that path as Graphide's own ACP agents run: as the person, in the workspace, outside the sandbox, with what agents may do there. A plugin switched off or removed takes its kind out of the list; an agent of it already running keeps running4
mentionsthe mention sources one manifest adds to the composer's @ in [[mentions]]8
mention_entriesthe entries one mention's answer shows; past it the first are kept and the plugin's log says so50
decoration_marksthe marks one set holds on one document10,000
decoration_bytesthe text of one set's marks on one document, their details and commands included256 KB
decorations_root_marksthe marks every plugin's sets hold on the documents of one root, and in one window200,000
decoration_detail_bytesa mark's detail; longer is cut1 KB
queriesthe [[queries]] one manifest declares: tree-sitter queries whose matches the editor marks itself, with no script16
query_bytesone query's .scm file64 KB
context_keysthe context keys a plugin may have set at once64
context_value_bytesa context key's string value256 bytes
layersthe key layers one manifest declares16
layer_keysthe keys one key layer binds64
layer_title_charsa key layer's title, the words of the mode pill while it is on12
layer_args_bytesa layer.enter's args, as JSON4 KB
graph_write_idsids in one graph.move or graph.remove call, before duplicates are removed1,000
graph_writesgraph write calls in one second per plugin, across every instance and root10
lsp_diagnosticsthe diagnostics one lsp.diagnostics answers; past it the least severe are left out1,000
lsp_message_bytesa diagnostic's message; longer is cut2 KB
lsp_symbolsthe symbols one lsp.symbols answers, children counted; past it the rest are left out5,000
lsp_pathsthe paths one lsp.diagnostics event names; when more changed it names none1,000
languagesthe [[languages]] one manifest declares. A language pack is data: [[languages]] id (the language's own id, as editors and language servers name it: zig), name, extensions (without the dot), filenames (whole names), shebangs (the programs a #! line names), grammar (a tree-sitter grammar compiled to WebAssembly, a .wasm file of the folder named after the grammar, so zig.wasm exports tree_sitter_zig), [languages.queries] highlights, injections, locals, folds and indents (.scm files of the folder, in tree-sitter's query language, highlights capturing by the usual names, keyword, string, function.call, a dotted name painting as its parent), comment = { line = "//", block = ["/*", "*/"] }, brackets = [["(", ")"], ...], and [languages.server] command (a program [allow] exec names), args and settings (what answers the server's workspace/configuration, under the person's own [lsp.servers.<plugin>.<id>.settings]). The editor knows the language's files by extension, name and #! line, and colours, comments and matches brackets with it; it runs the grammar in WebAssembly, confined. the daemon runs the server for the workspaces the person trusts, as it runs the built-in ones, after the person's [lsp] and before the built-in table: approving the pack approves its server. A language the editor links (go, rust, ...) keeps its own grammar; a pack may still add its server16
language_query_bytesone of a language's .scm query files1 MB
pack_bytesa language pack's folder, a plugin with [[languages]], for its grammars; another plugin's folder holds at most 2 MiB (manifest.size)16 MB
pack_filesthe files of a language pack's folder; another plugin's holds at most 200 (manifest.size)400

Views and data

A view or value larger than these is refused whole.

elements5,000
text_bytes256 KB
depth32
json_bytes1 MB
list_items1,000
key_bytes128 bytes
markdown_bytes64 KB
tag_chars24
code_bytes64 KB

These docs describe Graphide 0.2.16, the latest release. Something wrong or missing? Tell us onDiscord or at hello@graphide.com.