Skip to main content

Notebook and execution evidence

Use Notebook to inspect executed code, run a command in the current kernel and follow background work. For a saved file, open Provenance to inspect the execution and evidence associated with that file version.

Before running Python or R, enable a compatible runtime. For a complete data-analysis example, use the public-data workflow.

Platform
Your choice is kept across chapters.

Open a Session Notebook

  1. Open the project and conversation containing the calculation you want to inspect. If you are starting fresh, ask the agent to execute a small calculation in the Session Notebook first.
  2. Select Open notebook, or use the conversation menu View notebook.
  3. Select the Notebook tab when a file preview is active.
  4. Use Agent to choose the execution owner, then Python / R / Bash to choose the language.
  5. Open a numbered run and read its output and completion state. A copied activity labeled code shown contains displayed code; inspect the original producing session for its execution record.

Python execution and output in Notebook

ControlActionResult
AgentSelect Main or a child agentDisplays that owner's records; agents can have separate kernels
LanguageSelect an available languageChanges the records and console; install missing languages in Runtimes
Numbered runSelect a recorded executionOpens its code, output and status
Copy to clipboardCopy selected codeKeeps external paths and dependencies as written
Hide output / Show outputCollapse or expand outputChanges the view without rerunning code
run code in this kernel…Enter and submit codeExecutes in the selected live kernel
Close / collapse previewReturn to the conversationKeeps recorded execution history

Check Input data / Inputs when present. Match the displayed file and version to your request. If a reference is unavailable, reopen or attach the intended input through the application before retrying.

Work in the live kernel

Run a check yourself in the live kernel

Select Python, click run code in this kernel…, and enter the following self-contained command. It requires no dataset, third-party package or variables from an earlier conversation:

import sys
print("Python:", sys.version.split()[0])
print("Executable:", sys.executable)

Press Enter to execute; use Shift+Enter for a newline. Dismiss an open autocomplete menu with Escape before submitting. Confirm a numbered python · you entry and the interpreter information in its output. The executable should belong to the runtime you selected.

For R, select R and submit:

cat(R.version.string, "\n")
cat("R home:", R.home(), "\n")

Inspect the recorded R entry and its output. Python and R have separate variables. A NameError or object not found usually means the named object has not been created in that kernel; inspect your code before reusing a command from another session.

For a worked check of the interpreter and saved results, open Python and R runtimes and choose Windows at the top of the page.

Inspect live variables

  1. Select Inspect variables after a run that creates variables.
  2. Read Name, Type, Size / Shape and Preview.
  3. Enter a name from your own code in Filter variables. For the screenshot example, sha filters the listed hash variables; choose a name that exists in your own kernel.
  4. Use Refresh variables to read the current namespace, and Show private variables if the name you need is hidden.
  5. Select Close to return to the Notebook.

Filtering the variable list by name

A preview can abbreviate a value; print the needed field in the console to inspect it fully. Variable tracking is limited means the dependency graph is incomplete. For a tracked result, stale indicates a dependency changed; unknown means the relationship could not be established. Rerun affected code before using an outdated result.

Continue after a kernel change

Changing or rebuilding a runtime can stop its kernel. Saved files and execution records remain separate from in-memory variables. After the change, run the interpreter check above, recreate required variables by rerunning their producing code and reopen the saved files you need.

Use Runtimes for setup cancellation and reinstallation. A runtime rebuild, a normal kernel restart and recovery of a background job are different operations; check the relevant operation's status rather than assuming they restore identical state.

Run the same gene-count check in R

Worked example Check GSE60450 gene counts in R

  1. Install and enable R.
  2. Attach the original matrix. If comparing a Python result, attach that CSV to the same conversation as well.
  3. Ask for Session Notebook → R execution and the input/output requirements in the data-quality workflow. Specify preservation of complete identifiers and a separate output file.
  4. If Change notebook runtime? appears, confirm Language: R and the intended interpreter. Check the environment on the subsequent Run R code? request.
  5. Open Notebook → R, read the execution record, then open the saved CSV, figure and report.

R sample-QC output opened in the application

Compare metrics by the full sample identifier using the shared baseline. Keep the original source and record which metrics include or exclude zero counts. Raw-count QC prepares the data for a separately designed statistical analysis.

Keep the R result and its evidence together

Open the saved CSV's Provenance → Execution Log → Download notebook. Keep the export alongside its input and results. An export for one file version may omit later manual console commands.

Captured environment for an R result

The Runtimes package inventory describes the installed environment; Provenance describes the environment evidence captured for a particular file. Read partial or cached-inventory notices rather than comparing their package counts as if they were the same list.

Background tasks and result delivery

Ask for background execution when a supported Python, R, persistent REPL or shell task should continue while you work elsewhere. Include the input, outputs and stopping condition in the request.

  1. After admission, open the conversation's Background tasks entry. It groups local runs and remote Compute jobs; a conversation without tasks may not show it.
  2. Read the task identity, environment, status and elapsed time.
  3. Select Open to inspect the corresponding Notebook run or Compute job.
  4. To stop a task, select its Cancel control and wait for the status to settle. Check any files already saved before using or discarding them.
  5. After completion, inspect the delivered result message and open the saved outputs.
  6. After interruption or an app restart, inspect the existing task and any recovery message before submitting another copy.

Background task state and its Open control

StateWhat to check
Queued / RunningSelected environment and progress; shell jobs may wait for an execution slot
Cancelling / CancelledWhether cancellation is still processing or has settled
CompletedExit result and saved output files
Failed / Timed out / InterruptedFirst error, retained output and offered recovery action
Result unavailableExisting job record and recovery details

Closing the task list leaves the task running. Completion of a calculation and delivery of its result message are separate stages. Remote jobs also need the host and scheduler conditions in Remote compute.

Inspect one saved version's evidence

Open a saved file and select File actions → Provenance, or Open Provenance in its enlarged preview. Confirm the selected file version first.

Producer code captured for a saved result

Tab or controlUse it to inspect
CodeCaptured producer code, input references, copy/download and Generate script
Execution LogExecution records frozen for the selected version
MessagesCaptured requests and decisions associated with the result
EnvironmentInterpreter, package information and capture status; see restoration conditions.
ReproducibilityCaptured inputs, rerun checks, output comparisons and verification records.
ReviewReview associated with this exact file version
Previous / Next Artifact versionEvidence for another saved version; unavailable when none exists
Close ProvenanceReturn to the preview
LabelMeaning and next action
boundedThe retained evidence covers a limited scope. Keep that scope with exported code and results.
partialSome environment information is missing or unconfirmed. Record required dependencies before external reuse.
No review for this versionThis file version has no associated review. Use Reviewer to understand conversation and artifact review.
Cached environmentThe inventory was reused. Check the actual interpreter/packages when environment changes matter.

Editing a report creates another file version; it does not rerun the computation that produced a separate CSV. See Files and versions.

To inspect a review, select Review for the required version, expand its checks and use Go to transcript to inspect the cited activity. No issues found applies to those checks and that version; it does not fill missing execution or environment evidence. If a review was interrupted, open its Review error entry and choose Re-run review. After completion, return to the file's Review tab and confirm the new result. The earlier failed attempt can remain visible in the conversation.

Reproducibility

To rerun a captured result, compare outputs and save the verification record, follow the Reproducibility guide. This chapter covers Notebook execution, provenance inspection and code export.

Export and reuse code

Choose the export that matches your goal:

GoalEntryContents
Read the recorded producer codeCode → Captured producer block → DownloadCaptured source with its original paths and dependencies
Keep recorded Notebook cellsExecution Log → Download notebookA Notebook export for the selected result/version
Prepare a portable scriptCode → Generate scriptA model-generated reconstruction to inspect and test

Generate a standalone script

  1. Open the intended version's Provenance → Code. Check Inputs and Execution Log.
  2. Select a compatible default model in Settings → Model → Main model. This auxiliary feature uses that policy, which can differ from the conversation's model selection.
  3. Select Generate script and wait for Generating… to finish.
  4. Read the LLM-generated reconstruction label. Check input paths, dependencies and output locations before selecting Download script.
  5. In the system save dialog, choose a separate directory, check the .py filename, and confirm Save. Open the saved file to confirm it contains the displayed code.
  6. Supply the inputs using the exact filenames expected by the script, prepare its dependencies, then run it outside the app. Compare the output fields and input checksum with the saved result. A completed download alone does not verify the calculation.

Generated script preview and download control

Worked example Rerun the exported RNA-seq check outside the app

For a runnable downloaded example, save the script, input CSV and expected JSON into one folder. In that folder, run python3 GSE60450-portable-check.py. The script uses Python's standard library. Rename the downloaded expected JSON to expected.json before running: the script writes GSE60450-portable-check.json. Compare that generated file with expected.json before adapting the script to new data.

Download code when script generation is unavailable

If the app returns Artifact code reconstruction is unavailable with Codex subscription authentication., use a compatible provider for this auxiliary operation or download the captured producer code. This error concerns script reconstruction, not ordinary Codex Notebook execution.

For RECONSTRUCTION_UNAVAILABLE, inspect missing inputs or execution evidence. A captured-code download preserves available code; it cannot recover steps that were never captured.

Export and reuse the recorded Notebook

Select Provenance → Execution Log → Download notebook, choose a location and save. Open the export and check its language, cells and outputs.

Before an external rerun, prepare the input files, recorded dependencies and a writable output directory. Replace application-managed paths only in a working copy, keeping the original export intact. The export does not bundle credentials or the complete application environment. Example exports are available from Example data.

Interpret errors and warnings

SymptomNext action
Missing variableRerun the code that defines it in the selected language/kernel
Missing packageInspect that runtime's packages and follow Runtimes
Input version unavailableOpen or attach the intended current input; resolve its identity through the application
PermissionError / access deniedInspect the requested file and permission scope; report persistent access failures using Troubleshooting
Network/installer errorFollow Network using the affected hostname and full error
Warning with a completed runRead what the warning affects, then inspect the saved output before deciding whether to rerun

When reporting a problem, keep the first failing line, selected runtime, file identity and task state. Link saved output to its actual producing run.