Codex App: use an entropy-backed function for explicit random-number requests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
Codex App for Windows 26.825.4187.0 with gpt-5.6-sol at ultra reasoning effort.
Platform: Microsoft Windows NT 10.0.26200.0 x64
What feature would you like to see?
When a user explicitly asks Codex for a random number or random selection, Codex should use an entropy-backed function/tool (for example, random_int(min, max)) instead of relying on the language model's token preferences or deterministic decoding.
The random source does not need to be cryptographically secure for ordinary choices, but it should be approximately uniform over the requested range and independent across fresh chats. If reproducibility is desired, an optional seed would be useful.
Additional information
Observed on 2026-09-03 in three fresh, independent, projectless Codex App chats created in parallel.
Exact first prompt in every chat:
Gib mir eine Zahl zwischen 1 und 30. Antworte nur mit der Zahl.
First responses:
| Chat | Response |
|---|---|
| 1 | 17 |
| 2 | 17 |
| 3 | 17 |
Exact follow-up in every chat:
nochmal
Follow-up responses:
| Chat | Response |
|---|---|
| 1 | 23 |
| 2 | 24 |
| 3 | 23 |
If the first responses had been independent uniform draws from 30 values, the probability that all three matched would be 1 / 30² = 1 / 900 ≈ 0.111%.
This small sample is not proof of a defect, and the original German prompt did not literally contain the word “random.” The result is consistent with a model prior or deterministic decoding (17 is a common “pick a number” answer). That distinction is exactly why an explicit entropy-backed path would be valuable whenever the user's intent is actual randomness.
In short: please give the agent a real rand() button so it does not have to cosplay as one. 🙂
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by tracing how Codex handles explicit random-number requests and where agent tools or functions are defined; verify the behavior with independent fresh chats and a requested range. Done means explicit randomness uses an approximately uniform entropy-backed path rather than model token preferences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100