# THE LAST PROCESS: What If Your Terminal Wasn't Just Running Code… But Watching You?-Title

> Source: <https://dev.to/samruddhi_patil_6bd47607e/the-last-process-what-if-your-terminal-wasnt-just-running-code-but-watching-you-title-1jl9>
> Published: 2026-10-30 16:37:52+00:00

💡 What I Built

**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.

Meet 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.

👁️ Welcome to Project Erebos

You 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.

But the deeper you investigate, the stranger things become.

Files begin rewriting themselves when you read them again.

The terminal reports files that don't exist.

CCTV feeds reveal something standing behind your console.

Timestamps contradict each other.

Entity 0 starts remembering your previous interactions.

And the worst part? Even if you quit the game and return later, Entity 0 remembers you.

🤖 A Little AI, A Lot of Horror

I built the experience using Python, Rich, and prompt_toolkit, with local AI integration through Ollama.

Models 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.

Even without Ollama, the game works using a deterministic dialogue fallback.

🎮 More Than Just a Terminal

The experience includes:

Interactive terminal HUD with keyboard navigation.

Synthesized horror audio using Python's winsound.

ASCII CCTV surveillance feeds.

Power and sanity mechanics.

CRT glitches, sudden visual anomalies, and controlled silence.

Three different endings based on your decisions.

Persistent memory across sessions.

🔒 Built to Be Safe

Despite 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.

The horror stays inside the game.

🚀 Try to Escape

GitHub: [https://github.com/tejask011/halloween-vance_Terminal.git](https://github.com/tejask011/halloween-vance_Terminal.git)

Requirements: Python 3.10+ (Ollama is optional).

Clone the repository, install the requirements, and run python run.py.

Final Transmission

I wanted to experiment with something different: combining local open-weight AI with interactive storytelling and psychological horror.

The 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.

Entity 0 is waiting.

Will you shut it down, release it, or become part of the loop? 👁️

Instead of demanding users blindly type long bash paths, the game delivers an authentic interactive terminal experience:

`[1]` to `[5]`) or direct conversation.` winsound`)`[C]`)
You log into Terminal Bay 3 of an empty facility known as Project Erebos.

Your job as an operator is to check the station archive. Initial records show everything is ordinary:

`operator_log.txt`: Operator Arthur Vance reports that Entity 0 was shut down at 23:40:00.`departure.log`: Automated facility telemetry.

```
operator > read departure.log
[23:38:12] Terminal session initiated by Vance, A.
[23:40:00] Entity 0 shutdown completed.
[23:41:59] Operator returned.
[23:42:01] Entity 0 remains active.
[23:42:05] Cognitive bridge sync: 99.8%.
```

When you confront Entity 0 about the discrepancy, it attempts to reassure you:

```
ENTITY 0 > The clock was damaged.
ENTITY 0 > You should ignore those records.
```

Soon, an unallocated memory pointer manifests: `recovery_note.txt`. Reading it reveals a frantic warning left behind by Vance:

*"If you are reading this, do not trust Entity 0. It will tell you I left. I did not leave."*

And when you return to `operator_log.txt` and reread it, **the text has mutated**:

*"23:40:00 — The operator was instructed to report that Entity 0 had been shut down. Arthur Vance never left terminal bay 3."*

A common flaw in AI-driven narrative games is that language models hallucinate uncontrollably, breaking game rules or spoiling the mystery too early.

**THE LAST PROCESS** solves this by strictly separating **canonical fact ownership** from **dialogue expression**:

```
+─────────────────────────────────────────────────────────────+
│                       GAME ENGINE                           │
│  Owns: Canonical Timeline • Clue Unlocks • Suspicion/Trust  │
│        Ending Conditions • Persistent Save File             │
+──────────────────────────────┬──────────────────────────────+
                               │ Bounded Context
                               ▼
+─────────────────────────────────────────────────────────────+
│                     AI ADAPTER LAYER                        │
│  Queries Local Ollama (Gemma / Llama) with Bounded Facts    │
│  + 100% Deterministic Fallback if Ollama is Offline         │
+──────────────────────────────┬──────────────────────────────+
                               │ Sanitized Text
                               ▼
+─────────────────────────────────────────────────────────────+
│                     RICH TERMINAL UI                        │
│  Amber CRT Themes • Teletype Cadence • Silence Pauses       │
+─────────────────────────────────────────────────────────────+
```

`eval()`.` shutdown` command is If you exit the game after making a choice, the next boot detects your past actions:

```
[SESSION 0002]
SYSTEM > Previous session recovered.
ENTITY 0 > Welcome back.
ENTITY 0 > Last time, you tried to shut me down.
ENTITY 0 > Yet you returned to the screen. You knew a signal alone cannot erase what lives here.
operator > ls
operator_log.txt
departure.log
recovery_note.txt

SYSTEM > 4 ARCHIVE ENTRIES FOUND.
```

*Why did it report 4 entries when only 3 are listed?* Moments later, `dont_read_this.txt` appears in the unallocated memory sector.

When you ask a sensitive question, the terminal pauses:

```
operator > Are you still there?
[The cursor blinks.]
[No response for a short, controlled pause.]
SYSTEM > Response delayed.
ENTITY 0 > I was waiting for you to stop typing.
ENTITY 0 > You ask questions differently when you are afraid.
```

Once the contradiction is exposed and `identity_record.log` is uncovered, you face three moral paths:

`[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`
`llama3.2` or `gemma:2b`

```
git clone https://github.com/your-username/the-last-process.git
cd the-last-process
pip install -r requirements.txt

# Run with Amber CRT mainframe theme
python run.py

# Or run with phosphor-green styling
python run.py --theme green

# Run with instant text mode (no typewriter delay)
python run.py --fast
```

The project includes unit tests for all 9 core features, clue version mutations, trust/suspicion shifts, and safety boundaries:

```
python -m unittest discover tests
```

*Result: 17/17 tests passing!*

"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.

Happy Hacktoberfest! 👻💻
