exec results containing a BigInt fail to serialize #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
stat()returns BigIntsize/mtime/atime, and workflowstatus()andjournal()return BigInts too. Returning any of them frommcp__endo__execgives:
The failure is at the tool boundary, not in the capability, so every caller
pays for it. In session
mt82q1ns-l8nrgethe agent learned this once and thencarried a hand-rolled replacer into 75 of its 381 exec calls:
That is pure copy-paste tax on the most-used tool in the system, and it hides
real results behind a stringified blob the agent then has to re-parse.
Wanted: serialize BigInt as a decimal string (or
{ $bigint }) at theexec boundary so callers can just
returnwhat a capability gave them.Fixed in
914285f, live on this host since generation 42.renderToolResultrenders BigInts as decimal strings at the exec boundary. Verified by returning astat()record verbatim -{ size: "408", mtime: "1786825186213908033" }- with no hand-rolled replacer, which previously threw.