codex - 💡(How to fix) Fix Interrupted video transcription leaves generated transcript file locked by Python on Windows [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21245Fetched 2026-05-06 06:24:16
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4closed ×2commented ×2
RAW_BUFFERClick to expand / collapse

What version of Codex is running?

Unknown from UI; observed on May 5, 2026 in the Codex desktop app on Windows.

Which model were you using?

GPT-5 based Codex coding agent in the desktop app.

What platform is your computer?

Windows

What happened?

After asking Codex to transcribe a local video from the project docs folder, I interrupted the transcription while it was running. Codex had created a transcript file named 2026-05-05 21-39-46_PARTE_1.transcript.txt inside the project docs directory.

When I tried to delete that generated file from Windows Explorer, Windows showed that the file was still open in Python and could not be removed until the Python process was terminated.

The app had already uploaded feedback and showed this feedback/thread ID:

019df9f1-7d90-7950-8e06-b329535708db

Steps to reproduce

  1. In Codex desktop on Windows, ask Codex to transcribe a local video file.
  2. Let Codex start a Python-based transcription workflow that writes a transcript file into the working directory.
  3. Interrupt the task before transcription completes.
  4. Try to delete the generated transcript file from Windows Explorer.
  5. Observe that Windows reports the file is still in use by Python.

Expected behavior

Interrupting the task should cleanly release file handles and stop background Python processes so generated files can be deleted immediately.

Actual behavior

The generated transcript file remains locked by Python after interruption, and Windows blocks deletion until the Python process is killed.

Additional context

The generated file involved here was:

docs/2026-05-05 21-39-46_PARTE_1.transcript.txt

A related temporary audio extraction file was also created during troubleshooting, but the locking issue was specifically visible on the transcript file.

I initially tried to inspect the current in-app browser tab for the feedback modal, but direct browser automation in this environment was blocked by an outdated local Node runtime. The feedback ID above comes from the UI screenshot/link and should help correlate the uploaded report.

extent analysis

TL;DR

The issue can be mitigated by ensuring that the Python process initiated by Codex for transcription is properly terminated when the task is interrupted, allowing for the deletion of generated files.

Guidance

  • Investigate the Codex desktop app's task interruption mechanism to ensure it correctly stops and releases resources from the Python-based transcription workflow.
  • Verify that the Python process is properly cleaning up file handles when interrupted, potentially by implementing a try-except-finally block to ensure file closure.
  • Consider implementing a timeout or a more robust process management system to handle cases where the Python process does not terminate as expected.
  • Review the app's logging to understand why the file remains locked and to identify any potential issues with the transcription workflow.

Example

try:
    # Transcription workflow code here
    with open(transcript_file, 'w') as f:
        # Write transcript to file
finally:
    # Ensure file is closed
    f.close()

Notes

The exact solution may depend on the specifics of the Codex desktop app's implementation and the Python library used for file handling. Ensuring proper resource cleanup in the face of interruptions is crucial for preventing file locking issues.

Recommendation

Apply a workaround by manually terminating the Python process after interrupting the transcription task, as this directly addresses the symptom described, although a more permanent fix would involve modifying the Codex app to properly handle task interruptions and resource cleanup.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Interrupting the task should cleanly release file handles and stop background Python processes so generated files can be deleted immediately.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Interrupted video transcription leaves generated transcript file locked by Python on Windows [2 comments, 2 participants]