A new saved conversation
Pi starts blank, creates a session record, and saves the conversation so you can resume it later.
Course home · All verified lessons
Pi clean-launch flags
--no-sessionLearn why this flag exists even though plain pi already starts a new conversation.
Pi starts blank, creates a session record, and saves the conversation so you can resume it later.
Pi starts blank and keeps the conversation only in memory. When you exit, Pi has no saved session to resume.
pi -c returns to the last saved sessionTest a role, prompt, model behavior, or launch configuration without adding the test to Pi's saved conversation history.
A normal new session becomes the latest saved session. A temporary session does not, so pi -c can still return to the saved conversation you were using before the test.
If the conversation has no future value, there is no need to create another saved session.
If your only goal is to start with a blank conversation, plain pi already does that. Use --no-session only when you also want the new conversation to remain unsaved.
--no-tools.AGENTS.md and other resources can still load.This test changes no configuration. It creates one temporary conversation and then returns to your last saved one.
Before leaving: remember the return path. Exit a Pi editor with Ctrl+D when the editor is empty.
At the normal terminal prompt, start the temporary conversation with pi --no-session.
Inside temporary Pi, send the prompt below and observe that the conversation works normally.
Exit temporary Pi with Ctrl+D, then run pi -c at the terminal.
Expected result: your previous saved conversation returns. The temporary conversation is not the session that Pi resumes.
Answer one harmless question inside the temporary conversation so you can see that “no session” still provides a working conversation.
In one sentence, explain whether this temporary conversation can still answer me normally.
Pi can answer even though the conversation will not be saved as a resumable Pi session.
Explain which saved conversation pi -c reopened and why.
Why might you choose pi --no-session instead of plain pi, even though both start with a blank conversation?
pi saves the new conversation and makes it resumable, while pi --no-session keeps a disposable test out of saved session history and leaves pi -c pointing to the prior saved session.Precise wording: say “last saved session,” not merely “last session.” The temporary conversation happened, but Pi did not save it as a resumable session.
אפשרויות הפעלה נקייה של Pi
--no-sessionנבין למה האפשרות הזאת קיימת, אף על פי שהפעלה רגילה של pi כבר מתחילה שיחה חדשה.
Pi מתחיל משיחה ריקה, יוצר רשומת סשן ושומר את השיחה כדי שאפשר יהיה לחזור אליה בהמשך.
Pi מתחיל משיחה ריקה ושומר אותה רק בזיכרון בזמן שהיא פתוחה. כשיוצאים, אין ל-Pi סשן שמור שאפשר להמשיך.
pi -c חוזר לסשן השמור האחרוןאפשר לבדוק תפקיד, פרומפט, התנהגות של מודל או אפשרויות הפעלה בלי להוסיף את הניסוי להיסטוריית השיחות השמורות של Pi.
סשן חדש רגיל הופך לסשן השמור האחרון. שיחה זמנית לא משנה זאת, ולכן pi -c עדיין יכול להחזיר את השיחה השמורה שבה עבדנו לפני הניסוי.
אם לשיחה אין ערך להמשך, אין צורך ליצור עוד סשן שמור.
אם המטרה היחידה היא להתחיל שיחה ריקה, הפעלה רגילה של pi כבר עושה זאת. משתמשים ב---no-session רק כאשר רוצים שגם השיחה החדשה לא תישמר.
--no-tools.AGENTS.md ומשאבים אחרים עדיין יכולים להיטען.הבדיקה לא משנה הגדרות. היא יוצרת שיחה זמנית אחת ואז מחזירה אותנו לשיחה השמורה האחרונה.
לפני שיוצאים: זוכרים את דרך החזרה. יוצאים מ-Pi בעזרת Ctrl+D כאשר אזור הכתיבה ריק.
בשורת הפקודה הרגילה מפעילים שיחה זמנית באמצעות pi --no-session.
בתוך Pi הזמני שולחים את הפרומפט שלמטה ורואים שהשיחה פועלת כרגיל.
יוצאים מ-Pi הזמני באמצעות Ctrl+D, ואז מפעילים pi -c בשורת הפקודה.
התוצאה הצפויה: השיחה השמורה הקודמת חוזרת. Pi לא חוזר לשיחה הזמנית.
לענות על שאלה פשוטה בתוך השיחה הזמנית, כדי לראות ש-"ללא סשן" עדיין מאפשר שיחה פעילה.
הסבר במשפט אחד אם השיחה הזמנית הזאת עדיין יכולה לענות לי כרגיל.
Pi יכול לענות, אף על פי שהשיחה לא תישמר כסשן של Pi שאפשר להמשיך בעתיד.
מסבירים איזו שיחה שמורה נפתחה באמצעות pi -c ולמה.
למה כדאי לפעמים לבחור ב-pi --no-session במקום ב-pi רגיל, אף על פי ששניהם מתחילים בשיחה ריקה?
pi רגיל שומר את השיחה החדשה ומאפשר לחזור אליה, ואילו pi --no-session משאיר ניסוי זמני מחוץ להיסטוריית הסשנים השמורים ומשאיר את pi -c מכוון לסשן השמור הקודם.ניסוח מדויק: אומרים "הסשן השמור האחרון" ולא רק "הסשן האחרון". השיחה הזמנית התקיימה, אבל Pi לא שמר אותה כסשן שאפשר להמשיך.