Repository navigation
Conversation
Document the plain line-start MEDIA contract so agents avoid markdown-wrapped attachment directives that channels ignore. Co-authored-by: Cursor <[email protected]>
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Source inspection on current main shows splitMediaFromOutput skips fenced blocks and only parses lines whose trimmed start is MEDIA:, while the docs and prompt still only show the positive standalone form. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land or replace the docs/prompt clarification after resolving conflicts, and keep parser tolerance, warning logs, or sharp troubleshooting as separate scoped runtime follow-ups. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows splitMediaFromOutput skips fenced blocks and only parses lines whose trimmed start is MEDIA:, while the docs and prompt still only show the positive standalone form. Is this the best way to solve the issue? Yes. For the immediate docs/prompt gap, documenting the existing parser contract in docs/start/openclaw.md and src/agents/system-prompt.ts is the narrowest maintainable solution; parser widening or diagnostics should be separate behavior work. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 64b94daf92c4. |
|
Thanks, this is useful. I absorbed the MEDIA directive clarification into main in commit e0fda55. What landed: the docs and assistant output prompt now say MEDIA directives must start a line as plain text, outside code fences and without Markdown wrappers or inline prose. Proof run before landing:
Closing this PR because the change is now on main. |
Summary
MEDIA:<path-or-url>must be an unformatted line-start directive outside code fences.Fixes #78495.
Real behavior proof
MEDIA:must be a plain line-start directive outside code fences and without Markdown wrappers./Users/jefskywong/openclaw-workon macOS, branchdocs-media-directive-formatting, with repository dependencies installed viapnpm install --frozen-lockfile.MEDIA:form.Test plan
git diff --checkpnpm docs:listpnpm exec oxfmt --check --threads=1 src/agents/system-prompt.ts