#1665

End the turn at once on Esc during a stuck lookup on every connection path

Draftfazxeswants to merge intofrom

Summary

  • Esc or the connection setup deadline during a DNS lookup or connect that hangs now ends the turn at once with direct OpenAI Codex, xAI Grok, configured chat-completions providers, fx acp, and libfx's native addon. Before, only the AI Gateway in the TUI and fx ask did, and the rest sat out the whole lookup.
  • Ctrl-C on fx ask with one of those providers now exits at once while the lookup hangs, instead of after it returns.
  • After Esc in the TUI, the next prompt starts its request right away instead of waiting for the stuck lookup to end.
  • A model request with an overall deadline now ends at that deadline while its lookup hangs.
  • When fx walks away in the middle of a connect or TLS setup, it now closes that connection at once on every path, the pooled Gateway path included, instead of leaving it open until the server answers or gives up.
  • A lookup fx walked away from still runs to its end in the background. When it returns, fx does not connect, or closes what it connected, and frees the memory the request used.

Activity

1
fazxes7d ago

E2E shard 2/4 passed tui-startup.test.ts only on retry: /help keeps command descriptions close after a wide-to-narrow resize found the description at column 10 instead of 18 on the first run. This change does not touch the TUI or the command catalog.

This pull request is a draft

Merging is unavailable until it is marked ready for review.