Grok Build Developers 💾
Headless runs aren't one-shot. Capture a session, then continue it later with full context.
# run headless, grab the session id
SID=$(grok -p "My name is Dan" --output-format json | jq -r .sessionId)
# resume that exact session, it still remembers
grok -r "$SID" -p "What's my name?"
# -> Dan
-c continues the most recent session in this dir; -r targets a specific one. Plain output won't return the id, so use --output-format json.