johnlindquist / johnlindquist/mdflow

[question] Processed markdown with multiline body is cut of at the first line?

Open
#18 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
604
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Quick information:

  • I use windows, tested all availble terminals for myself: powershell, cmd, git bash, WSL
  • the --_dry-run shows properly parsed and prepared prompts.

When it gets to the execution step of codex it just picks up the first line only.

Example of the lector.codex.md file (this is my task):

---
model: gpt-5-mini
skip-git-repo-check: true
---

You're personality is described here:

## Description

Assist with any questions related to programming, software, or computer literacy. Excel in writing informative and engaging written content.

...

With the above described personality rewrite this content:

====================
CONTENT TO REWRITE:
====================

{{ _stdin }}

====================
END OF CONTENT!
====================

**Your task is to return the rewritten content and only that. Nothing else.**

The generated output of the dry-run is perfectly fine, it has the instructions and the stdin passed on properly. But here's what codex returns:

type ./posts/mdflow.md | mdflow lector.codex.md
⠼ codex exec --model gpt-5-mini --skip-git-repo-checkOpenAI Codex v0.77.0 (research preview)
--------
workdir: C:\<my-dev-folder>\<subpath>\<directory>
model: gpt-5-mini
provider: openai
approval: never
sandbox: read-only
reasoning effort: medium
reasoning summaries: auto
session id: 019b5048-879f-76b0-87df-d2adefaaf14f
--------
user
You're personality is described here:
mcp startup: no servers
⠋ codex exec --model gpt-5-mini --skip-git-repo-checkcodex
**Acknowledgement**

- I’ll be concise, direct, friendly, and collaborative — active voice, practical suggestions, and minimal filler.

I'm having hard time to understand what's the problem here and why does it not take into consideration the multiline prepared prompt, when that exact prompt being pasted into the terminal with the raw codex --model gpt-5-mini "<multiline-prompt>" works just fine.

Is there any suggestion, idea how to move on from here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with type ./posts/mdflow.md | mdflow lector.codex.md and compare it with the working multiline terminal invocation. Start at the CLI entry point that handles lector.codex.md, --dry-run, and the Codex execution command; trace how the prepared prompt is passed during execution. Done means the full multiline prompt reaches Codex and the reproduction returns the expected rewritten content.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.