Codex left WezTerm Lua config broken after edit instead of validating available config parser
What version of Codex is running?
codex-cli 0.114.0
What happened?
During a local Windows config-editing task, Codex modified a WezTerm Lua config and completed the task without running an available validation command. On the next WezTerm startup, the config failed to load with a Lua runtime error:
runtime error: [string "C:\\Users\\<user>\\.wezterm.lua"]:120: wrong number of arguments to 'insert'
stack traceback:
[C]: in function 'table.insert'
[string "C:\\Users\\<user>\\.wezterm.lua"]:120: in local 'ssh_command'
[string "C:\\Users\\<user>\\.wezterm.lua"]:126: in main chunk
The generated helper was assembling SSH command arguments for a WezTerm profile:
local function ssh_command(...)
local args = {}
for _, value in ipairs(ssh_prefix) do
table.insert(args, value)
end
for i = 1, select('#', ...) do
local value = select(i, ...)
table.insert(args, value)
end
return args
end
local ssh_target = ssh_command('-t', ssh_host, remote_shell_command)
A follow-up fix replaced the varargs/table.insert path with explicit list input and args[#args + 1] = value, then validated successfully with:
wezterm --config-file C:\Users\<user>\.wezterm.lua show-keys
Expected behavior
For known application config edits, especially where a fast local parser/validation command is available, Codex should run that validation before completing the task or otherwise surface the risk. In this case, wezterm show-keys would have caught the startup-breaking config immediately.
Actual behavior
Codex left a startup-breaking WezTerm config in place and reported the task as done. The user only discovered the failure by launching WezTerm afterward.
Environment
- OS: Windows / PowerShell
- Codex CLI:
0.114.0 - WezTerm:
20240203-110809-5046fc22
Hostnames, usernames, and private IPs have been redacted from this report.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗