Skip to content

[codex] Implement prompt message history CLI#1495

Draft
simonw wants to merge 3 commits into
mainfrom
codex/llm-prompt-messages
Draft

[codex] Implement prompt message history CLI#1495
simonw wants to merge 3 commits into
mainfrom
codex/llm-prompt-messages

Conversation

@simonw

@simonw simonw commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

This implements the documentation-driven llm prompt message-history workflow introduced on the branch:

  • adds --messages to load serialized Message JSON from an inline string, file path, or - for stdin
  • adds repeatable -M/--message ROLE TEXT entries for text-only system, user, and assistant messages
  • appends any regular prompt input as a final user message when explicit messages are used
  • rejects prompt-construction options that conflict with explicit message histories
  • adds focused CLI tests for JSON string, file, stdin, -M, prompt appending, and conflict handling

Impact

Users can replay or extend structured message histories from the CLI using the same serialized message format supported by the Python API.

Validation

  • uv run pytest tests/test_cli_messages.py
  • uv run pytest tests/test_cli_messages.py tests/test_parts.py tests/test_llm.py
  • uv run pytest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant