Built-in tool
Work with files and code
Run code, edit files, clone/pull/push GitHub repositories and use persistent terminals.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| codestring · optional | string | optional | Python or JavaScript. Working directory persists between turns. Python: from connie import tools; tools.call(name, args, key="stable-step"). JavaScript: const { tools } = await import("connie"); await tools.call(name, args, {key:"stable-step"}). A step key uses only letters, digits and _ . : - (at most 160 characters). |
| appIdstring · optional | string | optional | Managed app for custom commands or dependency installation. For source reads/edits and preview/build, use app-manage. Uses the app’s private source scope; omit repositoryMode, github, terminal and previewPort. Keep dependencies/caches outside source and include a package-lock.json. |
| filesobject · optional | object | optional | Optional text/code files to write before execution. Paths are relative to the workspace. Default: |
| githubobject · optional | object | optional | Authenticated GitHub transport using a connected account. Credentials stay on the host. Clone/pull run before code; push runs after successful code and only fast-forwards the explicit branch. Use git locally for commits/status/diff; use this field for network writes. |
| publishobject · optional | object | optional | Workspace file paths to publish as downloadable chat attachments after execution. All workspace files are also checkpointed automatically. Default: |
| languagestring · optional | string | optional | One of: Default: |
| terminalobject · optional | object | optional | Persistent interactive shell or dev server. Start with command; read/input/stop with returned terminalId. Input is literal text (include newline to submit; \u0003 interrupts). Output is bounded. Processes end after one hour or sandbox inactivity; never automatically restart after VM replacement. |
| previewPortnumber · optional | number | optional | Open a browser artifact for a running dev server in this conversation’s coding sandbox. Start the server with terminal first, listening on 0.0.0.0. The host resolves a short-lived private preview; no credentials are returned. |
| repairJobIdstring · optional | string | optional | Correct a failed program: provide its job ID and corrected code. Keeps original language, files, publish paths and completed tool receipts. Keep stable keys/arguments for completed tool steps. Up to three corrections per job. |
| resumeJobIdstring · optional | string | optional | Resume an interrupted or approved job without changing its code or repeating completed tool calls. |
| attachmentIdsobject · optional | object | optional | Original attachments to load into inputs/. Returned input paths identify the files. Default: |
| repositoryModeboolean · optional | boolean | optional | Enable a coding workspace: checkpoint Git history, executable files and safe relative symlinks; exclude untracked dependency caches. Edits survive failed tests. This mode remains active for this conversation. |
| timeoutSecondsnumber · optional | number | optional | Default: |