Repository navigation
docs(self): the session id comes from the agent's own system prompt - #893
Merged
Merged
Conversation
Corrects the guide alongside the skill. I had documented "find the row with `isStreaming: true`" as the way an agent learns its own session id; that is a workaround. The environment section of the prompt the agent runs under contains `Current session ID: <id>`, injected unconditionally whenever the id is non-empty. Verified from the outgoing provider request rather than the prompt builder: a local logging endpoint captured the real system message, and its id is byte-identical to that session's row in agent.db. `future session list --json` is reframed as what it is for — the other sessions (a previous conversation to resume) and cross-checking which row is you — with the two real traps kept: no `$FUTURE_SESSION_ID`, and a title is not an identity. Skills pointer -> futuregene/future-skills#67 (future-self v1.4.1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Corrects the self-inspection guide. I had documented "find the row with
isStreaming: true" as the way an agent learns its own session id. That is aworkaround — the id is already in the prompt the agent is running under.
Why, and how it was verified
The environment section of the system prompt contains:
Verified against a live run, not the prompt builder: a local endpoint captured
the real outgoing provider request (no credentials, no spend), and its id is
byte-identical to that session's row in
agent.db:Current session ID: 20261002-221636-4edc2aea2217477b9fa2b9ea663a54b4sessionsrow20261002-221636-4edc2aea2217477b9fa2b9ea663a54b4agent/src/prompt/mod.rsinjects it whenever the id is non-empty, andenvironment_reports_model_and_thinking_levelalready pinned the string — Ishould have read that before writing the section.
Shape
future session list --jsonreframed as what it is actually for: the othersessions (a previous conversation to resume), and cross-checking which row is
you.
shelltool exports no$FUTURE_SESSION_ID, and atitle is not an identity (several sessions can share one; a fresh one has none).
Skill → futuregene/future-skills#67
(
future-selfv1.4.1).