Skip to content

terminal: guard foreground server/watch commands (salvage #10810)#12723

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-dbe41156
Apr 19, 2026
Merged

terminal: guard foreground server/watch commands (salvage #10810)#12723
teknium1 merged 2 commits into
mainfrom
hermes/hermes-dbe41156

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #10810 by @etherman-os onto current main.

Summary

Rejects foreground terminal calls that start long-lived servers or use shell-level background wrappers, steering the model to background=true with actionable guidance. Complements #8340 (which unblocks the drain-thread hang) by preventing the bad pattern from being issued in the first place.

Changes

  • tools/terminal_tool.py: guard rejects nohup/disown/setsid/trailing & and long-lived patterns (npm/pnpm/yarn/bun run dev|start|serve|watch, docker compose up, next dev, vite, nodemon, uvicorn, gunicorn, python -m http.server) in foreground mode; --help/--version variants unblocked.
  • Tool description extended with explicit background-mode guidance for servers/watchers + readiness-check hint.
  • scripts/release.py: add etherman-os to AUTHOR_MAP.

Validation

scripts/run_tests.sh tests/tools/test_terminal_foreground_timeout_cap.py -q — 11 passed.

Closes #10810 with authorship preserved via cherry-pick.

@teknium1 teknium1 merged commit af53039 into main Apr 19, 2026
3 of 4 checks passed
@teknium1 teknium1 deleted the hermes/hermes-dbe41156 branch April 19, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants