fix(coding-agent): code mode description says schema tools resolve with their value on failure

This commit is contained in:
Mario Zechner 2026-10-12 00:23:28 +00:00
parent 8bb180bec1
commit 4270522473
2 changed files with 2 additions and 1 deletions

View file

@ -16,6 +16,7 @@
- Fixed Mistral streams being aborted mid-generation (e.g. during long thinking) after the request timeout; the timeout now applies only to waiting for response headers ([#10609](https://github.com/earendil-works/pi/issues/10609))
- Fixed a symlinked `AGENTS.md` in a git worktree nested inside its main repo causing no project context file to load ([#10681](https://github.com/earendil-works/pi/issues/10681))
- Fixed the code mode tool description claiming every failed tool call rejects; a tool that declares an output schema resolves with its value on failure too (e.g. `bash` with a nonzero exit)
## [1.1.0] - 2026-10-07

View file

@ -136,7 +136,7 @@ export const codemodeToolSystemPromptContribution = {
export const CODEMODE_DOCS_PATH = join(getDocsPath(), "codemode.md");
const DESCRIPTION_INTRO = `Run JavaScript that calls other tools. The input is raw JavaScript (not JSON, no code fence), run as an async function body in a QuickJS sandbox: top-level \`await\` and \`return\` work. No Node, file system, network, or timers.
- \`await tools.<name>({ ...args })\` resolves to a string, or an object if the tool's declaration says so, and rejects with an Error on failure. Calls still running when the script ends are cancelled.
- \`await tools.<name>({ ...args })\` resolves to a string, or an object if the tool's declaration says so, and rejects with an Error on failure. A tool whose declaration returns an object resolves on failure too when it returned that object; check its fields. Calls still running when the script ends are cancelled.
- Optional first line: \`// @options: {"max_output_tokens": 10000, "timeout_ms": 60000}\``;
/** One line per global. The details live in {@link CODEMODE_DOCS_PATH}. */