Pyrefly crashes when processing long Claude 4.5 conversations while using Antgravity
Pyrefly consistently crashes when handling slightly long conversations involving Claude 4.5 thinking. The crash seems internal to Pyrefly, not due to user code.
The language server crashes repeatedly with the following stack trace:
23: pyrefly::alt::expr::<impl pyrefly::alt::answers_solver::AnswersSolver<Ans>>::expr_infer_type_no_trace 24: pyrefly::alt::expr::<impl pyrefly::alt::answers_solver::AnswersSolver<Ans>>::expr_infer_type_info_with_hint 25: pyrefly::alt::expr::<impl pyrefly::alt::answers_solver::AnswersSolver<Ans>>::expr 26: pyrefly::alt::solve::<impl pyrefly::alt::answers_solver::AnswersSolver<Ans>>::binding_to_type 27: pyrefly::alt::solve::<impl pyrefly::alt::answers_solver::AnswersSolver<Ans>>::binding_to_type_info 28: pyrefly::alt::solve::<impl pyrefly::alt::answers_solver::AnswersSolver<Ans>>::solve_binding 29: pyrefly::alt::answers_solver::AnswersSolver<Ans>::calculate_and_record_answer 30: pyrefly::alt::answers_solver::AnswersSolver<Ans>::get_idx 31: pyrefly::alt::answers::Answers::solve 32: pyrefly::state::steps::Step::step_solutions 33: core::ops::function::FnOnce::call_once{{vtable.shim}} 34: pyrefly::state::state::Transaction::demand 35: pyrefly::state::state::Transaction::run_step::{{closure}} 36: <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute 37: rayon_core::registry::WorkerThread::wait_until_cold 38: std::sys::backtrace::__rust_begin_short_backtrace 39: core::ops::function::FnOnce::call_once{{vtable.shim}} 40: std::sys::pal::unix::thread::Thread::new::thread_start
PANIC Sorry, Pyrefly crashed, this is always a bug in Pyrefly itself. PANIC Please report the bug at https://github.com/facebook/pyrefly/issues/new [Error - 1:27:15 PM] Server process exited with code 101. [Error - 1:27:15 PM] The Pyrefly language server server crashed 5 times in the last 3 minutes. The server will not be restarted.
Pyrefly version: 0.43.1
OS: Ubuntu 22.01
IDE/editor: Antgravity
Thanks for the bug report! This is mysterious, I can't see why Claude and Pyrefly should directly interact in a way that causes crashes. It looks from the trace like this is happening in the middle of a fairly normal incremental update (Answers::solve is basically how we type check one module).
@kinto0 is there an easy way to get more out of the VSCode stack trace?
It's nice that it shows a stack, but line numbers would help more - there's no panic error so at this point it's hard to know where to start