Skip to content

Special cases

This ledger records conditionals that exist because an external system presents one particular situation. A conditional that applies a dreamcatcher rule is not a special case: lifecycle states, validation results and protocol event kinds belong to the rules that own them.

Every entry names the external cause that prevents the case from dissolving into a more general dreamcatcher rule.

Where Particular situation External cause
claude._read_system_event Reject a session identifier that is not text. Claude owns the streamed JSON shape, so dreamcatcher must defend its command-line session boundary when that external value has the wrong type.
codex._CodexHarnessAdapter._read Reject a session identifier that is not text. Codex owns the streamed JSON shape, so dreamcatcher must defend its command-line session boundary when that external value has the wrong type.
claude._read_system_event Treat a task_notification as a subagent report only when it carries usage. Claude uses the same event subtype for a completed subagent and a completed background command; only the subagent event carries usage.
claude._read_subagent_report Read a subagent's report from its handback report when it has one, and from its summary otherwise. Claude puts a pointer to the report in the summary when the subagent hands its report back, and the report itself in the handback report.
codex._CodexHarnessAdapter._read Render the error from turn.failed, but not the earlier error event. Codex streams the same turn failure twice, first as an error and then as the failed turn's reason.
codex._read_started_item Write a line for a collaboration item as it starts, and for no other item. Codex reports an item whole only when it finishes, and a wait on subagents lasts as long as they run, so its start is the one sign that the round is waiting.
commands.refuse_unquotable, commands._build_subprocess_command and commands._quote_windows_argument Refuse command-line text that cmd.exe acts on, and quote batch-file invocations for both cmd.exe and the child program. On Windows, npm-installed harnesses are batch files, and Python passes those invocations through cmd.exe rather than directly to the program.
teardown Use Job Objects on Windows and process groups on POSIX. The operating systems expose different primitives for containing and terminating a child process tree.
daemon._TERMINATION_SIGNALS Turn a hangup into an interrupt on POSIX alone. Windows has no hangup signal.
teardown.end_process_tree Read a permission error from ending a process group as a group with nothing left in it. macOS answers EPERM for a group whose only member has exited and not yet been waited for, where Linux answers that the group is gone.
github.InlineReviewComment._fall_back_to_the_original_lines Use an inline comment's original line positions when its current positions are absent. GitHub clears current positions after later commits move or remove the commented code, while retaining the positions the comment was written against.