Skip to content

fix: fix agent approvals, the FormPublisher tool, client files and Windows agent starts - #47

Merged
nodemode-ai merged 8 commits into
mainfrom
fix/review-2026-11-28
Nov 29, 2026
Merged

nodemode-ai merged 8 commits into
mainfrom
fix/review-2026-11-28

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • apply_commands now asks for approval before site.replace when Agent Connect is set to ask, using the same rule as the edit_* tools and their destructiveHint.
  • send_to_formpublisher runs the hand-off inside the engine instead of calling its own HTTP route, which always refused it without the window key.
  • The installed app refuses Write in Agent Connect (409) instead of writing client files that point at a launcher it does not ship, including the account-wide Antigravity file.
  • When frozen, the default allowed origins are only the desktop window's own origin. The Vite dev ports are allowed only from a source checkout, and FORMWEB_ORIGINS still overrides the list.
  • On Windows the Codex project file starts formweb.bat directly as a UTF-8 TOML string, not through sh -c.
  • Windows agent starts go through a new windows_start module. An npm .cmd shim is resolved to node.exe and its script, or to its native program, and run without cmd.exe. Any other .cmd or .bat start is refused when its words hold control characters, % or cmd special characters outside quotes. Batch names ending in dots, spaces or a data stream name are recognised as batch files.
  • Tests: test_agent_asks.py, test_agent_client_files.py and test_windows_start.py. Each fails on the code before its fix.
  • On Windows, a .cmd or .bat program that still starts through cmd.exe is refused when any argument or the program path holds a control character or any of & | < > ^ ( ) ! % ", quoted or not. A program path with spaces may not be followed by another argument with spaces. The message suggests passing long text through standard input or a file.
  • npm-installed agent programs keep starting node, or their native program, directly with an argument list and no command interpreter.
  • Unit tests for both paths run on any OS by testing the Windows argument builder with a fake environment.

Tests

  • Each fix has a test that fails on the previous code where practical.
  • The repo CI commands were run locally on macOS. Every failure seen locally also fails on main in the same environment (missing local tools or platform-specific tests); none is introduced here.
  • Please rely on this PR's CI run for Linux and Windows.

For the owner

  • A few related items need an owner decision; they are listed separately, not here.

How to ship

  • Independent of other repos; merge in any order. No version bump; release as usual.

…te does

apply_commands and the edit_* tools now share one rule for which commands remove content, so site.replace in a batch waits for approval when Agent Connect is set to ask.
The tool called the engine's own hand-off route over HTTP without the window key, which that route requires, so it was always refused. It now runs the same hand-off directly.
The installed app has no formweb launcher in its folder, so Write in Agent Connect now refuses there instead of adding entries that cannot start, including the account-wide Antigravity file.
On Windows the Codex project file starts formweb.bat directly instead of a Unix shell.
…y default

The editor's development ports are allowed only when running from the source folder. FORMWEB_ORIGINS still overrides the list.
…d.exe

An npm .cmd shim is resolved to node and its script, which then run directly. Any other .cmd or .bat start is refused when a word holds a control character, % or a cmd.exe character outside quotes, so prompts reach the program as given.
… Windows

A shim whose node is itself a batch file, or whose script runs under another program, now goes through the same checks as any other .cmd start. A program path ending in dots, spaces or a data stream name is recognised as the batch file Windows would run.
A folder name with characters outside the Basic Multilingual Plane no longer produces a config Codex cannot read.
…ts on Windows

A .cmd or .bat start that still goes through cmd.exe is refused when any word holds a control character or one of & | < > ^ ( ) ! % ", quoted or not, and when a program path that needs quotes is followed by a word that needs quotes. The message points to standard input or a file for long text. npm shims keep starting node or their native program directly.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:20
@nodemode-ai
nodemode-ai merged commit 72afa01 into main Nov 29, 2026
11 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants