Problem
notion-md edit swallows a body conflict to exit 0: editEditorPage catches NmdConflictError, relocates the draft to <page>.conflict.md, and returns a success EditResult{outcome:'conflict'}, so the editorExitCode teardown sees success → exit 0. A script cannot detect an edit conflict by exit code.
This is asymmetric with the exit-code contract (NmdConflictError → 7) and with the file-sync path, which does exit 7 on conflict.
Goal
notion-md edit conflict surfaces as a non-zero scriptable exit (7, matching the contract and the sync path), while still relocating the durable <page>.conflict.md and rendering the WARNING + fix: in the output.
Notes
Behavioral change to the engine's catch semantics (not the output seam) — deliberately out of scope for the #794 presentational output refactor, which preserves today's exit-0 behavior. Flagged during the Slice B milestone review.
Refs #794.
Posted on behalf of @schickling
| field |
value |
agent_name |
🏔️ cl1-ridge |
agent_session_id |
dd0a9ae0-bba8-43ad-8c01-449bd0bdca58 |
agent_tool |
Claude Code |
agent_tool_version |
2.1.165 |
agent_runtime |
Claude Code 2.1.165 |
agent_model |
claude-opus-4-8 |
runtime_profile |
/nix/store/4p78dsfk8riqcgk91zzjlgraibyf1hd4-coding-agent-runtime-profile/share/coding-agents/profile.json |
skills_manifest |
/nix/store/cly1vi1qvxfyk37gmdk4qw4j33zrfpny-agent-skills-corpus/share/agent-skills/manifest.json |
worktree |
effect-utils/schickling-assistant/2026-06-17-notion-md-edit-output |
machine |
dev3 |
tooling_profile |
dotfiles@e7e383b |
Problem
notion-md editswallows a body conflict to exit 0:editEditorPagecatchesNmdConflictError, relocates the draft to<page>.conflict.md, and returns a successEditResult{outcome:'conflict'}, so theeditorExitCodeteardown sees success → exit 0. A script cannot detect an edit conflict by exit code.This is asymmetric with the exit-code contract (
NmdConflictError → 7) and with the file-syncpath, which does exit 7 on conflict.Goal
notion-md editconflict surfaces as a non-zero scriptable exit (7, matching the contract and the sync path), while still relocating the durable<page>.conflict.mdand rendering the WARNING +fix:in the output.Notes
Behavioral change to the engine's catch semantics (not the output seam) — deliberately out of scope for the #794 presentational output refactor, which preserves today's exit-0 behavior. Flagged during the Slice B milestone review.
Refs #794.
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile