CodeWork
Agent

Tools

The built-in tools and how to turn them on or off.

Built-In Tools

ToolWhat it doesDefault
readRead a text file or imageOn
writeCreate or overwrite a fileOn
editReplace exact text in a fileOn
bashRun a shell commandOn
grepSearch file contentsOff
findFind files by globOff
lsList a directoryOff

Relative paths resolve against the session’s working directory.

Limits

  • read returns up to 2,000 lines or 50 KB, and can read a range of lines. Images (JPEG, PNG, GIF, WebP, BMP) go to the model as attachments.
  • write creates parent folders as needed.
  • edit takes a list of replacements. Each original piece must appear exactly once and not overlap another.
  • bash returns stdout and stderr together, cut to the last 2,000 lines or 50 KB. The full output is saved to a file in the sandbox. A non-zero exit is an error. The model can set a timeout in seconds.
  • grep uses ripgrep and returns 100 matches by default.
  • find uses fd and returns 1,000 results by default.
  • ls includes dotfiles and returns 500 entries by default.

grep and find skip files in .gitignore and include hidden files. If ripgrep or fd is missing, CodeWork downloads it to ~/.codework/bin on first use, inside the sandbox for remote sessions. In a virtual sandbox, find isn’t available.

Turn Tools On or Off

Each built-in tool is a plugin with the ID codework.tool.<name>. The search tools are off, so CodeWork searches with bash instead. Turn them on in your settings:

.codework/settings.jsonc
{
	"plugins": [
		{ "plugin": "codework.tool.grep", "enabled": true },
		{ "plugin": "codework.tool.find", "enabled": true },
		{ "plugin": "codework.tool.ls", "enabled": true },
	],
}

Set enabled to false to turn a tool off:

.codework/settings.jsonc
{
	"plugins": [{ "plugin": "codework.tool.write", "enabled": false }],
}

Use ~/.codework/settings.jsonc for every project, or .codework/settings.jsonc for one. Changes apply from your next message.

More Tools From Plugins

Plugins can add tools, change how a built-in tool is described, or check calls before and after they run.