Repository navigation
feat(cli): observe one session with a filtered, windowed transcript - #895
Merged
Merged
Conversation
`session info` gives a session's shape and `session history search|get` finds one passage, but nothing let a caller *process* a conversation: read every user message, separate a tool's arguments from its result, pull out the paths it touched, or page through a long session without loading it all into context. Add `future session transcript --session <id>`, which projects the same display entries `session info` already reads through a selectable lens: - `--select` (user/assistant/thinking/tool-call/tool-result/session/ compaction/all; thinking is opt-in because reasoning dominates bytes), `--tool`, `--input`/`--output`, `--paths`, `--grep`; - a window with `--cursor`/`--limit`/`--all` and `--max-bytes`, paged through the Agent's existing forward-page cursor and reported as `cursor`/`nextCursor`/`hasMore`; - `--truncate`, `--counts` (distribution of the window) and `--json`. `--tool` attributes a tool result through the name of the call it pairs with; a result whose call is outside the window is skipped and counted in `skippedUnattributedToolResults` rather than silently mislabelled. `future session info <id>` also gains `--json`, reporting `cwd`, model, thinking level and the computed stats with the raw session metadata. Docs: session-history gains the option table and the two documented limits; self-inspection and the CLI wiki list the new surface. Also fixes a pre-existing flake the new tests made reproducible: `tools::find_tool_entry_and_image_output_dir` reads HOME/FUTURE_HOME but did not take the shared env lock, so a concurrent test repointing FUTURE_HOME could fail it.
huichen
enabled auto-merge (squash)
October 3, 2026 09:27
huichen
added a commit
that referenced
this pull request
Oct 3, 2026
future-skills#69 teaches future-self the session-observation surface added in #895 (`future session transcript`, and `future session info --json`), so the installed skill matches the CLI that ships beside it.
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
future session infogives a session's shape,future session history search|getfinds one passage. Nothing let a caller process a whole conversation: read every user message, separate a tool's arguments from its result, pull out the paths it touched, or page a long session without loading it all into context.This adds
future session transcript --session <id>, which projects the display entries the Agent already serves (get_session_entries, honouring its forward-page cursor) through a selectable lens. Read-only: no model call, no tool execution, no session mutation.--select user,assistant,thinking,tool-call,tool-result,session,compaction,alluser,assistant,tool-call,tool-result; thinking is opt-in because reasoning dominates a real session's bytes)--tool <list>--input/--output--paths--grep <text>--cursor N/--limit N/--all/--max-bytes NnextCursor--truncate N,--counts,--json--countsgives the window's distribution (entries, block kinds, tools, errors, bytes) as a cheap first look at an unfamiliar session.Honest limits, both documented and reported:
--pathsis a heuristic, and--toolattributes a tool result through the name of the call it pairs with — a result whose call is outside the scanned window cannot be attributed, so it is skipped and counted inskippedUnattributedToolResultsrather than silently mislabelled.future session info <id>also gains--json(cwd, model, thinking level, computed stats, plus the raw session metadata), which is the direct answer to "what is this session's cwd".Why
A personal agent reading its own record (the
future-selfskill's use case) needs to slice a conversation, not just search it. Both new surfaces are reachable from the ordinaryshelltool, so nothing new is added to the model's tool set.Testing
cargo test -p future-cli --lib— 815 passed (24 new transcript tests: option strictness, selection, tool attribution, paths, grep, truncate, counts, paging/cursor, error propagation, plussession info --json)cargo fmt -p future-cli --check,cargo clippy -p future-cli --no-deps --all-targets -- -D warningspython3 scripts/docs/check-docs.py(+--strict-pending),check-channel-matrix.py--select user --all,--paths,--tool shell --select tool-result --output,--truncate,--grep --all,--cursorcontinuation,--max-bytes,session info --jsonAlso fixes a pre-existing flake the new tests made reproducible:
tools::find_tool_entry_and_image_output_dirreadsHOME/FUTURE_HOME(home policy + browser catalog) but did not take the shared env lock, so a concurrent test repointingFUTURE_HOMEcould fail it. It now takeslock_env()like every other env-sensitive test in the crate.