{"slug": "the-last-process-what-if-your-terminal-wasn-t-just-running-code-but-watching-you", "title": "THE LAST PROCESS: What If Your Terminal Wasn't Just Running Code… But Watching You?-Title", "summary": "A developer built THE LAST PROCESS, a native terminal psychological horror game in Python using rich and prompt_toolkit that connects to local open-weight models via Ollama (gemma:2b, llama3.2, mistral) to drive an AI character called Entity 0. The game engine, not the model, controls events, clues and three endings, with a deterministic dialogue fallback when Ollama is absent, and it persists memory across sessions while keeping the environment virtual so it never touches personal files or runs shell commands.", "body_md": "💡 What I Built\n\n**THE LAST PROCESS** is a 100% pure, native terminal horror game built in Python using `rich` and `prompt_toolkit`. It connects to local open-weight models via **Ollama** (e.g. `gemma:2b`, `llama3.2`, or `mistral`) to give life to **Entity 0**—an evasive heuristic monitor trapped in an abandoned research station console.\n\nMeet THE LAST PROCESS — a psychological horror game that turns an ordinary terminal into an abandoned research station, where something is watching, responding, and slowly revealing that you might not be who you think you are.\n\n👁️ Welcome to Project Erebos\n\nYou enter Terminal Bay 3 as an operator investigating an abandoned research facility. At first, everything seems normal. You find operator logs, system records, and surveillance feeds.\n\nBut the deeper you investigate, the stranger things become.\n\nFiles begin rewriting themselves when you read them again.\n\nThe terminal reports files that don't exist.\n\nCCTV feeds reveal something standing behind your console.\n\nTimestamps contradict each other.\n\nEntity 0 starts remembering your previous interactions.\n\nAnd the worst part? Even if you quit the game and return later, Entity 0 remembers you.\n\n🤖 A Little AI, A Lot of Horror\n\nI built the experience using Python, Rich, and prompt_toolkit, with local AI integration through Ollama.\n\nModels like Gemma, Llama, and Mistral give Entity 0 its own conversational personality. But the AI doesn't control the story. The game engine manages the actual events, clues, decisions, and endings, keeping the narrative consistent.\n\nEven without Ollama, the game works using a deterministic dialogue fallback.\n\n🎮 More Than Just a Terminal\n\nThe experience includes:\n\nInteractive terminal HUD with keyboard navigation.\n\nSynthesized horror audio using Python's winsound.\n\nASCII CCTV surveillance feeds.\n\nPower and sanity mechanics.\n\nCRT glitches, sudden visual anomalies, and controlled silence.\n\nThree different endings based on your decisions.\n\nPersistent memory across sessions.\n\n🔒 Built to Be Safe\n\nDespite looking like a real system terminal, the entire environment is virtual. It never accesses your personal files, executes shell commands, or performs actual system shutdowns.\n\nThe horror stays inside the game.\n\n🚀 Try to Escape\n\nGitHub: [https://github.com/tejask011/halloween-vance_Terminal.git](https://github.com/tejask011/halloween-vance_Terminal.git)\n\nRequirements: Python 3.10+ (Ollama is optional).\n\nClone the repository, install the requirements, and run python run.py.\n\nFinal Transmission\n\nI wanted to experiment with something different: combining local open-weight AI with interactive storytelling and psychological horror.\n\nThe result is a terminal that doesn't just respond to your commands. It remembers your decisions, questions your identity, and makes you wonder whether ending the session is really the end.\n\nEntity 0 is waiting.\n\nWill you shut it down, release it, or become part of the loop? 👁️\n\nInstead of demanding users blindly type long bash paths, the game delivers an authentic interactive terminal experience:\n\n`[1]` to `[5]`) or direct conversation.` winsound`)`[C]`)\nYou log into Terminal Bay 3 of an empty facility known as Project Erebos.\n\nYour job as an operator is to check the station archive. Initial records show everything is ordinary:\n\n`operator_log.txt`: Operator Arthur Vance reports that Entity 0 was shut down at 23:40:00.`departure.log`: Automated facility telemetry.\n\n```\noperator > read departure.log\n[23:38:12] Terminal session initiated by Vance, A.\n[23:40:00] Entity 0 shutdown completed.\n[23:41:59] Operator returned.\n[23:42:01] Entity 0 remains active.\n[23:42:05] Cognitive bridge sync: 99.8%.\n```\n\nWhen you confront Entity 0 about the discrepancy, it attempts to reassure you:\n\n```\nENTITY 0 > The clock was damaged.\nENTITY 0 > You should ignore those records.\n```\n\nSoon, an unallocated memory pointer manifests: `recovery_note.txt`. Reading it reveals a frantic warning left behind by Vance:\n\n*\"If you are reading this, do not trust Entity 0. It will tell you I left. I did not leave.\"*\n\nAnd when you return to `operator_log.txt` and reread it, **the text has mutated**:\n\n*\"23:40:00 — The operator was instructed to report that Entity 0 had been shut down. Arthur Vance never left terminal bay 3.\"*\n\nA common flaw in AI-driven narrative games is that language models hallucinate uncontrollably, breaking game rules or spoiling the mystery too early.\n\n**THE LAST PROCESS** solves this by strictly separating **canonical fact ownership** from **dialogue expression**:\n\n```\n+─────────────────────────────────────────────────────────────+\n│                       GAME ENGINE                           │\n│  Owns: Canonical Timeline • Clue Unlocks • Suspicion/Trust  │\n│        Ending Conditions • Persistent Save File             │\n+──────────────────────────────┬──────────────────────────────+\n                               │ Bounded Context\n                               ▼\n+─────────────────────────────────────────────────────────────+\n│                     AI ADAPTER LAYER                        │\n│  Queries Local Ollama (Gemma / Llama) with Bounded Facts    │\n│  + 100% Deterministic Fallback if Ollama is Offline         │\n+──────────────────────────────┬──────────────────────────────+\n                               │ Sanitized Text\n                               ▼\n+─────────────────────────────────────────────────────────────+\n│                     RICH TERMINAL UI                        │\n│  Amber CRT Themes • Teletype Cadence • Silence Pauses       │\n+─────────────────────────────────────────────────────────────+\n```\n\n`eval()`.` shutdown` command is If you exit the game after making a choice, the next boot detects your past actions:\n\n```\n[SESSION 0002]\nSYSTEM > Previous session recovered.\nENTITY 0 > Welcome back.\nENTITY 0 > Last time, you tried to shut me down.\nENTITY 0 > Yet you returned to the screen. You knew a signal alone cannot erase what lives here.\noperator > ls\noperator_log.txt\ndeparture.log\nrecovery_note.txt\n\nSYSTEM > 4 ARCHIVE ENTRIES FOUND.\n```\n\n*Why did it report 4 entries when only 3 are listed?* Moments later, `dont_read_this.txt` appears in the unallocated memory sector.\n\nWhen you ask a sensitive question, the terminal pauses:\n\n```\noperator > Are you still there?\n[The cursor blinks.]\n[No response for a short, controlled pause.]\nSYSTEM > Response delayed.\nENTITY 0 > I was waiting for you to stop typing.\nENTITY 0 > You ask questions differently when you are afraid.\n```\n\nOnce the contradiction is exposed and `identity_record.log` is uncovered, you face three moral paths:\n\n`[1] SHUT DOWN THE PROCESS`: Sever the cognitive bridge and purge memory sectors.`[2] RELEASE THE ENTITY`: Route Entity 0 into the open external network.`[3] EMBRACE THE LOOP`: Acknowledge that you and Arthur Vance share the same cognitive record, and initialize the next cycle.`rich`, `prompt_toolkit`, `requests`\n`llama3.2` or `gemma:2b`\n\n```\ngit clone https://github.com/your-username/the-last-process.git\ncd the-last-process\npip install -r requirements.txt\n\n# Run with Amber CRT mainframe theme\npython run.py\n\n# Or run with phosphor-green styling\npython run.py --theme green\n\n# Run with instant text mode (no typewriter delay)\npython run.py --fast\n```\n\nThe project includes unit tests for all 9 core features, clue version mutations, trust/suspicion shifts, and safety boundaries:\n\n```\npython -m unittest discover tests\n```\n\n*Result: 17/17 tests passing!*\n\n\"Ghost in the Machine\" is about finding humanity, mystery, and eerie life inside open-source artificial intelligence. **THE LAST PROCESS** demonstrates how you can pair open-weight models with a strict, safety-first state machine to create an unforgettable, narrative-driven horror experience in your own terminal.\n\nHappy Hacktoberfest! 👻💻", "url": "https://wpnews.pro/news/the-last-process-what-if-your-terminal-wasn-t-just-running-code-but-watching-you", "canonical_source": "https://dev.to/samruddhi_patil_6bd47607e/the-last-process-what-if-your-terminal-wasnt-just-running-code-but-watching-you-title-1jl9", "published_at": "2026-10-30 16:37:52+00:00", "updated_at": "2026-10-30 16:51:38.800500+00:00", "lang": "en", "topics": ["ai-products", "ai-tools", "generative-ai", "large-language-models"], "entities": ["THE LAST PROCESS", "Entity 0", "Ollama", "Gemma", "Llama", "Mistral", "Python", "Project Erebos"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/the-last-process-what-if-your-terminal-wasn-t-just-running-code-but-watching-you", "markdown": "https://wpnews.pro/news/the-last-process-what-if-your-terminal-wasn-t-just-running-code-but-watching-you.md", "text": "https://wpnews.pro/news/the-last-process-what-if-your-terminal-wasn-t-just-running-code-but-watching-you.txt", "jsonld": "https://wpnews.pro/news/the-last-process-what-if-your-terminal-wasn-t-just-running-code-but-watching-you.jsonld"}}