Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

TypeScript SDK: DEL characters produce invalid TOML overrides and corrupt escaped strings

Open Beginner friendly
#51,545 0 comments 0 reactions 0 assignees View on GitHub

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

bug CLI config
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.