{
  "id": 15388821,
  "title": "Closing a Terminal Sends Your Coding Agent SIGHUP. How Session Hosts Keep It Alive",
  "url": "https://urgent.news/2026/10/18/closing-a-terminal-sends-your-coding-agent-sighup-how-session-hosts",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-18T10:01:47.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gabrielanhaia/closing-a-terminal-sends-your-coding-agent-sighup-how-session-hosts-keep-it-alive-2p7j"
  },
  "original_language": "en",
  "account": "When you close a terminal window while a coding agent is executing a long refactor, that process disappears along with any progress it had not saved to disk. The terminal app never actively sought out the agent. Two \"hops\" caused its demise: the kernel informed the shell that its terminal had disconnected, delivering the SIGHUP signal, and the shell in turn passed that signal to every job it managed.\n\nDifferent methods can stop this chain of events, each cutting through a distinct hop. \"nohup\" and \"disown\" eliminate the job from the shell's list, while \"setsid\" and \"tmux\" create a new session, sidestepping the terminal altogether. Only one method, \"tmux\", leaves the agent with a functional terminal window you can continue interacting with.\n\nTo demonstrate, you can test each approach in separate terminal windows. Start a \"sleep\" command as a background job, then apply each technique and close the window. Use \"ps\" to monitor which processes remain after the window closes and a new one is opened. The surviving processes show different behaviors depending on the technique employed.",
  "summary": "Book: System Design Pocket Guide: Interviews The series: Pocket Guides for Developers — 8 short books on agents, RAG, prompts, observability, events, databases and system design — the whole series My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You hand a coding agent a long refactor, watch it start on the test…",
  "key_points": [
    "Closing terminal window kills coding agent process",
    "SIGHUP signal from kernel to shell ends the job",
    "tmux creates new session, keeps agent alive"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}