US-5: REPL Guard
Parent Epic: #4 (Event Coverage & Error Handling)
As a user,
I want to get a clear error if I try to combine --json with REPL mode,
so that I dont get a broken hybrid output.
Acceptance Criteria
Technical Notes
- Check after args.parse_args(): if args.json is set AND no message AND stdin is a tty → emit error event + sys.exit(1)
- Does NOT enter agent.repl() — exits before agent is instantiated
- Error event is the only output (no session_start)
US-5: REPL Guard
Parent Epic: #4 (Event Coverage & Error Handling)
As a user,
I want to get a clear error if I try to combine
--jsonwith REPL mode,so that I dont get a broken hybrid output.
Acceptance Criteria
cortex --jsonwithout a message (entering REPL mode) produces error event with code "REPL_INCOMPATIBLE"Technical Notes