You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readJobProgressPreview in plugins/codex/scripts/lib/job-control.mjs extracts recent progress lines from jobs/<id>.log for /codex:status (job.progressPreview) and inferLegacyJobPhase. Because it matches any line starting with [ (line.startsWith("[")) and strips /^\[[^\]]+\]\s*/, bracket-prefixed lines inside multi-line blocks written by appendLogBlock (Assistant message, Subagent <name> message, Reasoning summary, Review output, Final output) are misread as timestamped progress updates.
Reproduction
Create a job log with createJobLogFile, appendLogLine, and appendLogBlock:
Call readJobProgressPreview(logFile, 4) (or enrichJob on a running/failed job).
Actual
readJobProgressPreview treats [1]: https://example.com/spec and [x] Verified baseline as log headers, strips the leading [...] token (": https://example.com/spec", "Verified baseline"), and pushes real progress updates out of progressPreview. Similarly, a bracketed line inside a subagent or assistant message block such as [step 2] Applying 3 file change(s)... becomes "Applying 3 file change(s)..." and causes inferLegacyJobPhase to report "editing" instead of "investigating". Quoted ISO-timestamped lines inside the Final output block also leak into progressPreview.
Expected
readJobProgressPreview should only parse genuine ISO-8601 UTC timestamped log entry headers ([YYYY-MM-DDTHH:mm:ss.sssZ] ...), ignore bracket-prefixed lines inside logged message/review/reasoning blocks, and stop at the terminal Final output block header.
Activity