Skip to content
Development
Agent

pty

- `packages/core/src/services/pty/` — terminal env construction, shell resolution, spawning, and session registry - `packages/core/src/runtimes/terminals/` — interactive terminal lifecycle and Wire component - `packages/core/src/runtimes/scripts/` — lifecycle script execution

From plugin
emdash
5.7k32 skills32 agents

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

- `packages/core/src/services/pty/` — terminal env construction, shell resolution, spawning, and session registry - `packages/core/src/runtimes/terminals/` — interactive terminal lifecycle and Wire component - `packages/core/src/runtimes/scripts/` — lifecycle script execution

Agent definition

pty.md

Risky Area: PTY And Sessions

Main Files

  • `packages/core/src/services/pty/` — terminal env construction, shell resolution, spawning, and session registry
  • `packages/core/src/runtimes/terminals/` — interactive terminal lifecycle and Wire component
  • `packages/core/src/runtimes/scripts/` — lifecycle script execution through the shared PTY plane
  • `packages/core/src/runtimes/tui-agents/` — PTY-backed agent sessions, runtime-owned hook server, hook installation, and agent state LiveModels
  • `src/main/core/agent-status/` — desktop projection of runtime agent states into the conversation cache
  • `src/services/notifications/` — desktop notification feed, batching, sound sink, and OS notification sink

Core Risks

  • PTY cleanup and exit handling
  • resize behavior
  • shell quoting and Windows command wrapping
  • tmux lifecycle
  • provider-specific resume/session behavior
  • env passthrough safety

Rules

  • construct every PTY environment through `packages/core/src/services/pty/api/terminal-env.ts`
  • keep the host/worker `process.env` separate from the captured user-shell environment; only the

host process captures it, spawning runtimes receive a parent-owned source and resolve that source exactly once per spawn, never as an ambient fallback or immutable worker config

  • do not weaken quoting or spawn behavior casually
  • validate both direct spawn and shell-wrapped spawn cases when changing PTY startup logic
  • confirm renderer event flow if hook/plugin payload or agent status behavior changes
Read more
Ships withemdash

Emdash is the Open-Source Agentic Development Environment (🧡 YC W26). Run multiple coding agents in parallel. Use any provider.

Get the whole plugin
Stats
5,748
Stars
589
Forks
Active
Maintenance
TypeScript
Language
Apache-2.0
License
8m ago
Last commit
1y ago
Created

Repo: generalaction/emdash

Other agents on emdash.