TypeScript SDK: DEL characters produce invalid TOML overrides and corrupt escaped strings
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
The TypeScript SDK uses JSON.stringify to serialize TOML overrides, which fails for strings containing DEL (U+007F). Locate the serialization code in the SDK and replace it with a shared string serializer that escapes DEL as \u007f. Add executor tests for scalar strings, string arrays, and nested inline-table keys containing DEL. Run the executor test suite to verify all 16 tests pass and TOML parsing succeeds.
Written by the indexing model from the issue text.
Description
What issue are you seeing?
The TypeScript SDK uses JSON.stringify() to serialize TOML string values and inline-table keys. JSON permits a literal DEL character (U+007F), but TOML basic strings require it to be escaped. Consequently a supported string array such as notify can fail configuration loading, and scalar instruction strings containing DEL plus a newline, tab, or backslash can silently lose escape decoding.
SDK main ac9b5b8380517ded445b09dd3196d8d9e2ba3c59 was tested on Linux with Node.js v24.19.0. Native parser/config behavior was checked with Codex CLI 0.159.0-alpha.3.
What steps can reproduce the bug?
Configure the SDK with:
const codex = new Codex({
config: { notify: ["node", "/tmp/a\u007fb.mjs"] },
});
The SDK emits an override equivalent to the JSON serialization below. To exercise configuration loading without a model call:
import { spawnSync } from "node:child_process";
const override = `notify=${JSON.stringify(["node", "/tmp/a\u007fb.mjs"])}`;
const result = spawnSync("codex", ["features", "list", "--config", override], { encoding: "utf8" });
console.log(result.status, result.stderr);
On the tested native CLI this exits 1: invalid type: string ..., expected a sequence in notify. The literal DEL makes TOML parsing fail; the CLI's raw-string fallback then treats the entire array as a string.
For a scalar developer_instructions string containing DEL and an actual newline, the same fallback preserves the literal backslash-n escape rather than the original newline. I verified the prompt content via the native debug prompt-input command using marker-delimited test strings. DEL alone in a scalar is preserved by the fallback, so this report does not claim every scalar containing DEL fails.
What is the expected behavior?
Serialize supported string values and inline-table keys as valid TOML while preserving their content, including nested arrays/tables.
Additional information
A candidate adds a shared string serializer that replaces the literal DEL in the JSON-quoted string with the TOML Unicode escape \u007f, using it for both string values and quoted inline-table keys. It does not change configuration path-key semantics or numeric handling.
Two added executor cases cover scalar strings/string arrays and nested inline-table keys/values. All 16 executor tests, SDK build/type declarations, ESLint, and Prettier pass. Real SDK argument capture plus TOML parsing verifies exact nested content round trips. With the candidate, the native notify configuration exits 0 and native prompt-input retains all tested instruction content.
Searched TypeScript/DEL and SDK TOML serialization reports and found no equivalent issue. No external PR is requested, consistent with the contribution policy.
- Dominant language
- Rust
- Stars
- 128k
- Forks
- 20.1k
- Avg merge
- 1m
- Merged PRs (30d)
- 994
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
app enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
app bug config windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openai/codex#51926 · 2 comments ·
Maintainers usually reply within 1 day
-
app bug model-behavior windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
openai/codex#51912 · 1 comment ·
Maintainers usually reply within 1 day
-
app bug dots remote
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
app bug performance
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
openai/codex#51818 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
elodin-sys/elodin#890 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
guidance-ai/llguidance#391 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Verifiedz/Shimmer#144 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Y-ASLant/ElegantClipboard#166 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day