TypeScript SDK: DEL characters produce invalid TOML overrides and corrupt escaped strings
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Il SDK TypeScript utilizza JSON.stringify per serializzare gli override TOML, il che fallisce per le stringhe che contengono DEL (U+007F). Individua il codice di serializzazione nel SDK e sostituiscilo con un serializzatore di stringhe condiviso che esegua l'escape di DEL come \u007f. Aggiungi test dell'esecutore per stringhe scalari, array di stringhe e chiavi di tabelle in linea nidificate contenenti DEL. Esegui la suite di test dell'esecutore per verificare che tutti e 16 i test passino e che l'analisi TOML abbia esito positivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 130k
- Fork
- 20.5k
- Merge medio
- 1m
- PR unite (30g)
- 995
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openai/codex
-
Image previews disabled inside Herdr despite Kitty graphics supportForse già presa @akhil9tiet l’ha presa oggi. Apertabug CLI TUI
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
openai/codex#57329 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
app bug plan
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
CLI documentation hooks windows-os
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Docs: clarify CLA signing instructions while external pull requests are restrictedForse già presa @akhil9tiet l’ha presa 1 giorno fa. Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
openai/codex#57033 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug CLI config
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openai/codex
Issue simili
-
component:benchmark
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
agentic-os-org/ANOLISA#9177 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
oracle/rust-oracledb#61 ·
-
bug priority-medium to-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
Databricks tool-only response crashes in resolve_reasoning_and_content with KeyError: contentForse già presa @1divyanshdev l’ha presa oggi. Apertallm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
BerriAI/litellm#48637 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno