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
toolsearchFind and load deferred toolsAuto

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. A model without image input is told the image was left out.
  • write creates parent folders as needed.
  • edit takes a list of replacements. Each piece of text to replace must appear exactly once in the file, and no two pieces can overlap.
  • 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 code counts as 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. For remote sessions, the download goes inside the sandbox. 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>. grep, find, and ls are off by default, so the agent 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.

Deferred tools

Some tools aren’t sent to the model up front. These are deferred tools. To use one, the model first calls toolsearch with a few words. The best matches, 8 by default, are available from its next call and stay available for the rest of that thread.

Deferred tools come from plugins, or from MCP servers whose exposure (the setting for which tools the model sees) is deferred.

toolsearch turns itself on when a thread has deferred tools, or an enabled MCP server with deferred exposure. Add a settings entry to turn it off, or to turn it on when nothing is deferred:

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

More tools

Plugins can add tools, change how a built-in tool is described, or check calls before and after they run. MCP servers add their tools as mcp__<server>__<tool>.

The model can only run tools it has been sent. A call to any other tool returns an error.