logoalt Hacker News

josephernesttoday at 10:47 AM1 replyview on HN

You can use this small Python script to display an histogram of `reasoning_output_tokens` in your past Codex sessions. I do see a spike at 516 indeed.

  import os, glob, re
  import matplotlib.pyplot as plt
  vals = []
  for f in glob.glob(os.path.expanduser(r"~\.codex") + r"\**\*", recursive=True):
      if os.path.isfile(f):
          try:
              s = open(f, "r", encoding="utf-8", errors="ignore").read()
              vals += [int(x) for x in re.findall(r'"reasoning_output_tokens"\s*:\s*(\d+)', s)]
          except Exception:
              pass
  plt.hist(vals, bins=200, range=(0, 5000), weights=[100 / len(vals)] * len(vals))
  plt.xlabel("reasoning_output_tokens")
  plt.ylabel("%")
  plt.show()

Replies