In what way do you find it undocumented. You left off the
documentation of "pathname children" where this feature *is*
documented:
pathname children item ?newchildren?
If newchildren is not specified, returns the list of children
belonging to item.
If newchildren is specified, replaces item's child list with
newchildren. Items in the old child list not present in the new
child list are detached from the tree. None of the items in
newchildren may be an ancestor of item.
It is behaving exactly as documented, in the documentation for the
"pathname children" subcommand.