Reading files limited to 200 lines

Resolved 💬 7 comments Opened Jan 9, 2026 by vzaliva Closed Jan 9, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.79.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.2 xhigh

What platform is your computer?

Linux 6.14.0-1018-oem x86_64 x86_64

What issue are you seeing?

When it is reading project files it complains that the output is limited to 200 characters and attempts to find some clumsy way around it (e.g. using sed).

What steps can reproduce the bug?

Mention via @ any .md file in project which is more than 200 lines long.

What is the expected behavior?

Read full file (in my case it was just 400 lines)

Additional information

This is a critical issue preventing me from using Codex. I need it to be fixed ASAP or at least a workaround provided.

View original on GitHub ↗

7 Comments

etraut-openai contributor · 6 months ago

Assuming you can repro this, please use the /feedback command to upload your logs and session details and post the thread ID here.

vzaliva · 6 months ago

thread ID 019ba3c6-4465-76b0-8948-06926fae09ac

vzaliva · 6 months ago

Model says:

• Explored
  └ List doc
    Read closure-eq-issue.md

• It looks like I read the first 200 lines of the file, but there might have been a truncation issue. The output lines extend to 224, so I still need to check the rest, especially the Implementation Plan with Stage 1. I wonder if I can use the command sed -n '200,400p' to get the remaining sections properly. It's
  important to ensure I have all the necessary information to proceed!
etraut-openai contributor · 6 months ago

Thanks for uploading the session details. I briefly skimmed through it, but I didn't see anything problematic. This is model behavior. It tends to read 200 lines at a time to prevent filling the context window unnecessarily. It will read additional lines as needed.

Are you seeing a functional problem that you're seeing? Is it failing to preform the task that you're asking it to do?

You mentioned that this was a "critical problem preventing you from using Codex". Can you provide more details about why this is preventing you from using Codex?

vzaliva · 6 months ago

There was also a previous report of a similar issue: https://github.com/openai/codex/issues/6733

I do not think I've seen this problem until the most recent update. The difficulty is that instead of reading a small file with just 400 lines, it attempts to read it, then realises it truncated, saying "thinking about ways to resolve the truncation issue", then attempts to use nl, sed commands. All this back-and-forth takes time and tokens, slows reasoning, and potentially eats up context.

Maybe my characterisation "preventing use" was a bit too strong. But it definitely makes it much less efficient than using other tools like Claude Code, especially for tasks requiring a lot of file operations.

etraut-openai contributor · 6 months ago

I think it's working as intended, but we'll pass along your feedback to the folks who train our models.

vzaliva · 6 months ago

When using the same model via Cursor, I do not have this issue. It is certainly Codex-CLI or the internal MCPs it uses.