[Coda] Add structured workspace command action - #2972
Merged
George Ng (GeorgeNgMsft) merged 8 commits intoSep 5, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
George Ng (GeorgeNgMsft)
enabled auto-merge
September 4, 2026 05:48
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Tal Zaccai (TalZaccai)
requested changes
Sep 4, 2026
Contributor
|
George Ng (@GeorgeNgMsft) - I opened an issue regarding the silent keyword-file drift. If you have some time and can address it - that'd be great! :) #2978 |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ontract Scope the command-result failure shape to the two workspace-command actions. Every other code action failing in the websocket handler was answering with a stdout/stderr/exitCode payload, which displayCodaResult rendered as a fake command result. Only runWorkspaceCommand skips the await in the message loop. Making every action fire-and-forget let unrelated editor mutations interleave; cancellation only needs the long-running action to be non-blocking. Make executionId optional in the MCP input schema. It was required there while the action schema and the .agr grammar both omit it, so grammar-sourced actions failed validation. The Command Executor now resolves one up front and forwards it, so the result and any cancellation refer to the same command. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fb716021-4cea-41f8-9b92-36508a78285b
…config Move the cancellation-control routing table out of codeActionHandler into cancellationControl.ts behind a minimal sendToClient interface, and cover it with tests. The table's invariant is that every entry is removed exactly once, on a response, either side disconnecting, a delivery failure, the timeout, or teardown. That is the most stateful code in the feature and had no coverage; each path now asserts the table drains. Correct the command-risk documentation. commandRiskLevel is declared by the caller and is advisory. The enforced boundary is the focused-tool allowlist plus workspace-root path confinement, not a classification Coda performs. Regenerate the workbench keyword file for the changed schema comment. Collapse the two duplicated workspace-command failure literals in the Command Executor into one builder, and note the timeout constants that are duplicated across packages and the two unrelated 5s constants. Replace the hardcoded test file list in coda's test:local with a tsconfig, so adding a test file no longer means editing package.json. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fb716021-4cea-41f8-9b92-36508a78285b
The run_workspace_command tool description now states that the tool holds the Command Executor for the whole run, so callers know to use a separate MCP connection for concurrent work. cancelWorkspaceCommand gains a comment explaining why it talks to the Code Agent websocket directly instead of going through the dispatcher, and notes the known agent-discovery limitation. Also renames workspaceCommandNonRunResult to unexecutedWorkspaceCommandResult. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fb716021-4cea-41f8-9b92-36508a78285b
Tal Zaccai (TalZaccai)
approved these changes
Sep 5, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Summary
Adds an action to directly run structured commands for the VS Code Coda integration and MCP clients. Allows the user to conveniently run their build commands quickly and in the same window as TypeAgent.
Structured command:
run command pnpm run buildorexecute command pnpm run lintuses the new grammar and structured runner.Examples :



un_workspace_command and cancel_workspace_command MCP tools with structured output.
Validation