Skip to content

T007: Add --stop flag for self-close without new session#19

Merged
grobomo merged 1 commit intomainfrom
015-T007-stop-flag
Apr 6, 2026
Merged

T007: Add --stop flag for self-close without new session#19
grobomo merged 1 commit intomainfrom
015-T007-stop-flag

Conversation

@grobomo
Copy link
Copy Markdown
Owner

@grobomo grobomo commented Apr 6, 2026

Summary

  • New --stop flag: saves SESSION_STATE.md then kills current tab without launching a new one
  • Use case: stop hook calls new_session.py --stop to cleanly self-close when done
  • Refactored main() to skip prompt/cmd building in stop mode (faster exit)
  • Also includes T006 parent trust walk from PR T006: Parent trust walk — skip writes when parent trusted #18

Test plan

  • python scripts/test.py — 70 passed
  • bash scripts/test/test-T007-stop-flag.sh — flag parsing and code path verified

Saves SESSION_STATE.md then kills current tab's shell process tree.
Use case: stop hook can call `new_session.py --stop` to cleanly
self-close when no more work remains.
@grobomo grobomo merged commit c41d31a into main Apr 6, 2026
1 check passed
@grobomo grobomo deleted the 015-T007-stop-flag branch April 6, 2026 04:33
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.

1 participant