Skip to content

Session follow-ups: run id and verified folders, aliases, declared deps, docs - #152

Merged
kalil0321 merged 11 commits into
mainfrom
kalil0321/session-followups
Oct 29, 2026
Merged

kalil0321 merged 11 commits into
mainfrom
kalil0321/session-followups

Conversation

@kalil0321

@kalil0321 kalil0321 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Why

Follow-ups to #151:

  • The session imported two packages that were only installed as dependencies of other packages.
  • The line-by-line CLI's /quit and /commands stopped working.
  • The website docs still described the old prompt.
  • A run's id and folder were hard to find from the session.

What

  • Declare prompt-toolkit and markdown-it-py as direct dependencies.
  • /quit runs /exit and /commands runs /help. The / menu also matches them by alias.
  • engineer passes --output-dir on to the prompts typed after its first run, like agent and collector.
  • The status row under the input shows the run id.
  • When the agent verifies the client, the verified step lists the run's folder and its synced ./scripts copy as absolute, clickable paths.
  • Docs:
    • the full-screen session, its slash commands and keys;
    • subcommands opening the session in a terminal;
    • which runs /resume can pick up;
    • the current models, effort, and the default config as the code defines it.

Verification

  • pytest: 1194 passed, 8 skipped. ruff check and mypy clean.
  • End-to-end tests in a real terminal (pty): 130/130 checks. These include /commands and /quit, the run id in the status row, the verified folders, and opening a folder by clicking it.
  • pnpm build in website/: 22 pages.

Out of scope

Porting /settings, manual, collector and OpenCode runs into the session.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T03:22:47.344470Z 64a4b41 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 12 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="website/content/docs/modes/agent.mdx">

<violation number="1" location="website/content/docs/modes/agent.mdx:40">
P2: The `/resume` sentence reads as if any past run can be resumed. Add that only runs which saved their SDK session can be resumed (agent and engineer runs from this version on), as the README does.</violation>
</file>

<file name="src/reverse_api/repl/app.py">

<violation number="1" location="src/reverse_api/repl/app.py:78">
P3: The aliases work when typed, but the `/` menu omits them because `palette_items()` reads only `COMMANDS`. Add both aliases to the menu so users can discover and complete them.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread website/content/docs/modes/agent.mdx Outdated

The agent's steps, messages and reasoning stream into the conversation. Type a
follow-up when it finishes, answer its questions in the input bar, and press
`Esc` to stop it. `/resume` picks a past run back up where it stopped.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The /resume sentence reads as if any past run can be resumed. Add that only runs which saved their SDK session can be resumed (agent and engineer runs from this version on), as the README does.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At website/content/docs/modes/agent.mdx, line 40:

<comment>The `/resume` sentence reads as if any past run can be resumed. Add that only runs which saved their SDK session can be resumed (agent and engineer runs from this version on), as the README does.</comment>

<file context>
@@ -23,12 +23,28 @@ English; providers such as Playwright MCP or Chrome DevTools MCP route browser a
+
+The agent's steps, messages and reasoning stream into the conversation. Type a
+follow-up when it finishes, answer its questions in the input bar, and press
+`Esc` to stop it. `/resume` picks a past run back up where it stopped.
+
 ## Running non-interactively
</file context>
Suggested change
`Esc` to stop it. `/resume` picks a past run back up where it stopped.
`Esc` to stop it. `/resume` picks a past run back up where it stopped, if it saved its session: agent and engineer runs from this version on can be resumed; collector runs cannot.

"/help": "keys and commands",
"/exit": "quit rae",
}
ALIASES = {"/quit": "/exit", "/commands": "/help"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The aliases work when typed, but the / menu omits them because palette_items() reads only COMMANDS. Add both aliases to the menu so users can discover and complete them.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/reverse_api/repl/app.py, line 78:

<comment>The aliases work when typed, but the `/` menu omits them because `palette_items()` reads only `COMMANDS`. Add both aliases to the menu so users can discover and complete them.</comment>

<file context>
@@ -75,6 +75,7 @@
     "/help": "keys and commands",
     "/exit": "quit rae",
 }
+ALIASES = {"/quit": "/exit", "/commands": "/help"}
 HISTORY_RUNS = 20
 # Commands that open a picker are echoed once a choice shows something, not when the picker opens.
</file context>

Comment on lines +60 to +62
In a terminal, `agent`, `engineer` and `collector` open the session in their
mode and start the run, keeping options such as `--headless` and
`--output-dir` for the prompts you type next. `agent` and `engineer` print

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Output folder promise is wrong

This says engineer keeps --output-dir for later prompts, but it only keeps that option for the first run. Unlike agent and collector, engineer supplies no runner to open_session; later tasks call run_engineer without output_dir. Both later run-ID prompts and free-text instructions therefore save generated scripts in the default folder instead of the chosen folder. This is a non-blocking documentation error that can leave users looking for results in the wrong place. Limit this promise to agent and collector, or preserve the option for engineer too.

Artifacts

Executable engineer session validation script

  • The authored executable drives the real terminal/session dispatch with narrowly mocked generation and asserts initial versus subsequent output locations, making the reproduction rerunnable.

Engineer output before later prompts

  • Executed the initial engineer task under a real PTY and captured arguments, file location, source ranges, command, and exit code 0, showing the chosen output folder is initially honored.

Engineer output after later prompts

  • Executed the initial task followed by run-ID and free-text prompts under a real PTY and captured all arguments and fixture writes with exit code 0, showing both later tasks use the default folder.

Python interpreter restoration log

  • Restored the missing Python 3.13.17 interpreter targeted by the supplied virtual environment's broken symlink, allowing the existing environment to execute the check.

Head verification and unchanged product code

  • Captured the requested Git head, empty tracked diff, working-tree status, and executable-script checksum, confirming validation did not modify product code.

View artifacts

TREX Ran code and verified through TREX

Prompt To Fix With AI
This is a comment left during a code review.
Path: website/content/docs/cli/commands.mdx
Line: 60-62

Comment:
**Output folder promise is wrong**

This says `engineer` keeps `--output-dir` for later prompts, but it only keeps that option for the first run. Unlike `agent` and `collector`, `engineer` supplies no `runner` to `open_session`; later tasks call `run_engineer` without `output_dir`. Both later run-ID prompts and free-text instructions therefore save generated scripts in the default folder instead of the chosen folder. This is a non-blocking documentation error that can leave users looking for results in the wrong place. Limit this promise to `agent` and `collector`, or preserve the option for `engineer` too.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/reverse_api/cli.py Outdated
@kalil0321 kalil0321 changed the title Session follow-ups: declared deps, /quit and /commands, docs Session follow-ups: run id and verified folders, aliases, declared deps, docs Oct 28, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/reverse_api/repl/view.py Outdated
Comment thread website/content/docs/cli/commands.mdx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/reverse_api/cli.py">

<violation number="1" location="src/reverse_api/cli.py:1939">
P3: Scanning collector entries without `paths.har_dir` creates an empty `har/<run_id>` directory for each one because `get_har_dir()` creates directories. Resolve this fallback without creating the directory during a lookup.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/reverse_api/cli.py Outdated

def _har_path(run_id: str, run: dict[str, Any]) -> Path:
"""Where a run in history keeps its captured traffic."""
return Path((run.get("paths") or {}).get("har_dir") or get_har_dir(run_id, None)) / "recording.har"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Scanning collector entries without paths.har_dir creates an empty har/<run_id> directory for each one because get_har_dir() creates directories. Resolve this fallback without creating the directory during a lookup.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/reverse_api/cli.py, line 1939:

<comment>Scanning collector entries without `paths.har_dir` creates an empty `har/<run_id>` directory for each one because `get_har_dir()` creates directories. Resolve this fallback without creating the directory during a lookup.</comment>

<file context>
@@ -1927,10 +1927,16 @@ def engineer_from_prompt(text: str, model: str | None = None, output_dir: str |
+
+def _har_path(run_id: str, run: dict[str, Any]) -> Path:
+    """Where a run in history keeps its captured traffic."""
+    return Path((run.get("paths") or {}).get("har_dir") or get_har_dir(run_id, None)) / "recording.har"
 
 
</file context>

@kalil0321
kalil0321 merged commit b984370 into main Oct 29, 2026
15 checks passed

This branch was successfully deployed

1 active deployment
preview — 64a4b415 Deployed Oct 29, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant