Skip to content

Tell the agent to write cancellable, bounded Ghidra scripts - #89

Merged
linted merged 1 commit into
mainfrom
worktree-script-cancellation-points
Nov 19, 2026
Merged

linted merged 1 commit into
mainfrom
worktree-script-cancellation-points

Conversation

@linted

@linted linted commented Nov 19, 2026

Copy link
Copy Markdown
Owner

A script the agent wrote (a per-chunk getBytes sweep over a 90 MB region with no monitor check) held Ghidra's program-DB lock for ~70 min, which jammed every other MCP tool and even Save until the JVM had to be killed.

Add a 'Writing Ghidra scripts' section to the coordinator and worker system prompts: guard every loop with the task monitor (monitor.isCancelled() / incrementProgress, as the built-in scripts do) so a stuck run can be cancelled, and bound the work instead of sweeping whole regions byte by byte.

A script the agent wrote (a per-chunk getBytes sweep over a 90 MB region
with no monitor check) held Ghidra's program-DB lock for ~70 min, which
jammed every other MCP tool and even Save until the JVM had to be killed.

Add a 'Writing Ghidra scripts' section to the coordinator and worker system
prompts: guard every loop with the task monitor (monitor.isCancelled() /
incrementProgress, as the built-in scripts do) so a stuck run can be
cancelled, and bound the work instead of sweeping whole regions byte by byte.
@linted
linted merged commit 1e05699 into main Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant