Remix.run Logo
fulafel 2 hours ago

Smells like floating point. Python prompt:

  >>> int(float('348555896224571969'))
  348555896224571968
It just exceeds the mantissa bits of doubles:

  >>> math.log2(34855589622457196)
  54.952239550875795
JavaScript (in)famously stores all numbers as floating point resulting in silent errors also with user perceived integers, so this might be an indication that Claude Code number handling uses JS native numbers for this.
ec109685 2 hours ago | parent [-]

They wrap bash with python.

fulafel 2 hours ago | parent [-]

I still suspect JS. It's much harder to shoot yourself in the foot with Python. Even if you use JSON:

  >>> json.loads('{"nr": 348555896224571969}')
  {'nr': 348555896224571969}
  >>> type(_['nr'])
  <class 'int'>