Course home · All verified lessons

Verified lesson - Learn Pi

Pi clean-launch flags

Focus 1:
--no-session

Learn why this flag exists even though plain pi already starts a new conversation.

pi

A new saved conversation

Pi starts blank, creates a session record, and saves the conversation so you can resume it later.

pi --no-session

A temporary conversation

Pi starts blank and keeps the conversation only in memory. When you exit, Pi has no saved session to resume.

Last saved sessionTemporary testpi -c returns to the last saved session

Why use it?

1

For a throwaway experiment

Test a role, prompt, model behavior, or launch configuration without adding the test to Pi's saved conversation history.

2

To protect your resume path

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.

3

When you know you will not continue it

If the conversation has no future value, there is no need to create another saved session.

When you do not need it

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.

What it does not do

It does not disable tools.Tools are controlled separately, for example with --no-tools.
It does not disable context.AGENTS.md and other resources can still load.
It does not disable extensions or skills.Those have their own launch flags.
It does not mean offline or private.Your model provider still receives requests according to its service and policies.

Try the complete loop

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.

What this prompt asks Pi to do

Answer one harmless question inside the temporary conversation so you can see that “no session” still provides a working conversation.

Exact prompt to copy

In one sentence, explain whether this temporary conversation can still answer me normally.

What to watch

Pi can answer even though the conversation will not be saved as a resumable Pi session.

What to report afterward

Explain which saved conversation pi -c reopened and why.

Understanding check

Why might you choose pi --no-session instead of plain pi, even though both start with a blank conversation?

Because plain 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

מיקוד 1:
--no-session

נבין למה האפשרות הזאת קיימת, אף על פי שהפעלה רגילה של pi כבר מתחילה שיחה חדשה.

pi

שיחה חדשה שנשמרת

Pi מתחיל משיחה ריקה, יוצר רשומת סשן ושומר את השיחה כדי שאפשר יהיה לחזור אליה בהמשך.

pi --no-session

שיחה זמנית

Pi מתחיל משיחה ריקה ושומר אותה רק בזיכרון בזמן שהיא פתוחה. כשיוצאים, אין ל-Pi סשן שמור שאפשר להמשיך.

הסשן השמור האחרוןניסוי זמניpi -c חוזר לסשן השמור האחרון

למה להשתמש בזה?

1

לניסוי חד-פעמי

אפשר לבדוק תפקיד, פרומפט, התנהגות של מודל או אפשרויות הפעלה בלי להוסיף את הניסוי להיסטוריית השיחות השמורות של Pi.

2

כדי לשמור על דרך החזרה

סשן חדש רגיל הופך לסשן השמור האחרון. שיחה זמנית לא משנה זאת, ולכן pi -c עדיין יכול להחזיר את השיחה השמורה שבה עבדנו לפני הניסוי.

3

כשברור שלא נמשיך את השיחה

אם לשיחה אין ערך להמשך, אין צורך ליצור עוד סשן שמור.

מתי אין צורך בזה?

אם המטרה היחידה היא להתחיל שיחה ריקה, הפעלה רגילה של pi כבר עושה זאת. משתמשים ב---no-session רק כאשר רוצים שגם השיחה החדשה לא תישמר.

מה האפשרות הזאת לא עושה?

היא לא מבטלת כלים.כלים נשלטים בנפרד, למשל באמצעות --no-tools.
היא לא מבטלת קובצי הקשר.AGENTS.md ומשאבים אחרים עדיין יכולים להיטען.
היא לא מבטלת הרחבות או מיומנויות.להם יש אפשרויות הפעלה נפרדות.
היא לא יוצרת מצב לא מקוון או פרטי.ספק המודל עדיין מקבל בקשות בהתאם לשירות ולמדיניות שלו.

מתרגלים את כל המסלול

הבדיקה לא משנה הגדרות. היא יוצרת שיחה זמנית אחת ואז מחזירה אותנו לשיחה השמורה האחרונה.

לפני שיוצאים: זוכרים את דרך החזרה. יוצאים מ-Pi בעזרת Ctrl+D כאשר אזור הכתיבה ריק.

בשורת הפקודה הרגילה מפעילים שיחה זמנית באמצעות pi --no-session.

בתוך Pi הזמני שולחים את הפרומפט שלמטה ורואים שהשיחה פועלת כרגיל.

יוצאים מ-Pi הזמני באמצעות Ctrl+D, ואז מפעילים pi -c בשורת הפקודה.

התוצאה הצפויה: השיחה השמורה הקודמת חוזרת. Pi לא חוזר לשיחה הזמנית.

מה הפרומפט מבקש מ-Pi לעשות?

לענות על שאלה פשוטה בתוך השיחה הזמנית, כדי לראות ש-"ללא סשן" עדיין מאפשר שיחה פעילה.

הפרומפט המדויק להעתקה

הסבר במשפט אחד אם השיחה הזמנית הזאת עדיין יכולה לענות לי כרגיל.

למה לשים לב?

Pi יכול לענות, אף על פי שהשיחה לא תישמר כסשן של Pi שאפשר להמשיך בעתיד.

מה מדווחים לאחר מכן?

מסבירים איזו שיחה שמורה נפתחה באמצעות pi -c ולמה.

בדיקת הבנה

למה כדאי לפעמים לבחור ב-pi --no-session במקום ב-pi רגיל, אף על פי ששניהם מתחילים בשיחה ריקה?

כי pi רגיל שומר את השיחה החדשה ומאפשר לחזור אליה, ואילו pi --no-session משאיר ניסוי זמני מחוץ להיסטוריית הסשנים השמורים ומשאיר את pi -c מכוון לסשן השמור הקודם.

ניסוח מדויק: אומרים "הסשן השמור האחרון" ולא רק "הסשן האחרון". השיחה הזמנית התקיימה, אבל Pi לא שמר אותה כסשן שאפשר להמשיך.

Continue learning

Return to all verified lessons or open the course home.