📋 Pre-flight Checks
🐛 Bug Description
When setup writes the agent configuration, string values are inserted into
the generated TOML without escaping. TOML v1.0 basic strings require \ and
" to be escaped, so any value containing them produces a file no compliant
parser will read.
This is not a corner case on Windows: the install paths resolve under
%APPDATA%, so the emitted value contains backslashes by construction.
🔁 Steps to Reproduce
Run the setup on a path containing a backslash or a double quote — on Windows,
the default install path is enough — then parse the generated TOML.
✅ Expected Behaviour
The generated file is valid TOML, and the value read back is byte-for-byte
what was written.
❌ Actual Behaviour
The emitted string is written raw. A path such as
C:\Users\name\AppData\Roaming becomes an invalid escape sequence, and the
config fails to parse.
📦 Affected Area
internal/setup — config writing for the Gemini and Codex integrations.
📎 Additional Context
I have a fix ready: a tomlStringEscape helper applied when writing string
values, with round-trip tests that use a hand-rolled decoder to assert the
emitted value parses back to the original.
Happy to open the PR once this is approved.
📋 Pre-flight Checks
status:approvedbefore a PR can be opened🐛 Bug Description
When
setupwrites the agent configuration, string values are inserted intothe generated TOML without escaping. TOML v1.0 basic strings require
\and"to be escaped, so any value containing them produces a file no compliantparser will read.
This is not a corner case on Windows: the install paths resolve under
%APPDATA%, so the emitted value contains backslashes by construction.🔁 Steps to Reproduce
Run the setup on a path containing a backslash or a double quote — on Windows,
the default install path is enough — then parse the generated TOML.
✅ Expected Behaviour
The generated file is valid TOML, and the value read back is byte-for-byte
what was written.
❌ Actual Behaviour
The emitted string is written raw. A path such as
C:\Users\name\AppData\Roamingbecomes an invalid escape sequence, and theconfig fails to parse.
📦 Affected Area
internal/setup— config writing for the Gemini and Codex integrations.📎 Additional Context
I have a fix ready: a
tomlStringEscapehelper applied when writing stringvalues, with round-trip tests that use a hand-rolled decoder to assert the
emitted value parses back to the original.
Happy to open the PR once this is approved.