Repository navigation
Conversation
antiv
requested changes
Oct 10, 2026
Owner
There was a problem hiding this comment.
Thanks! Removing status: migrated says the page has been checked, but a few statements in it don't match the code yet, so the guide itself needs edits in this PR:
- "Isolated temp directory per run (cleaned up after)": the
finallyblock only unlinksscript.pyand callsos.rmdir(tmp_dir). If the script writes any file,rmdirfails silently and themate_exec_*directory stays.execute_shell_commandcreates no temp dir at all and runs in the server's working directory. Please also drop "isolated"; the tool is not a sandbox. - "System
python(same as the server process)": the code runs["python", script_path], i.e. whateverpythonis first onPATH, notsys.executable. It can be a different interpreter, or missing where onlypython3exists. {"code_executor": {"timeout": 60}}: saving Tool Configuration in the dashboard writescode_executor = true(agent-tools.js:85), which drops the custom timeout. Worth saying.- "Timed-out processes are killed": for
execute_shell_command(shell=True) only/bin/shis killed; processes it started can keep running. - Error returns: empty input and exceptions return
{"status": "error", "error_message": ...}withoutstdout/stderr. Document that shape too. covers:should also listshared/utils/tools/tool_factory.py(the widget-key check the guide describes), and the dashboard warning intemplates/dashboard/modals/config_modals.html/static/js/agent-tools.js(step 3 in #206).- Nit: the override accepts
1,trueoryes.
Then run python scripts/gen_docs.py --check again and I'll take another look.
Contributor
Author
|
Thank you for the detailed feedback. I have updated
|
Owner
|
Thanks, all seven points are in. Two small things before merging:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #206.
Summary of Changes
docs/dev/code-executor.mdagainst the underlying implementation files:shared/utils/tools/code_executor_tools.py: confirmed parameter definitions forexecute_python_codeandexecute_shell_command, timeouts (default 30s, max 120s), output capping (50,000 chars), isolated temporary directory lifecycle (mate_exec_...), and return dictionary structures.shared/utils/tools/tool_factory.py: confirmed widget key safety guard (_agent_has_widget_keyrefusing executor on agents with widget keys unlessMATE_ALLOW_CODE_EXECUTOR_ON_WIDGET=true).status: migratedfrom frontmatter indocs/dev/code-executor.md.python3 scripts/gen_docs.py --check(passes with 0 errors).