Skip to content

Expose the cell name to code blocks as RUNME_NAME - #1352

Open
cvas22 wants to merge 1 commit into
runmedev:mainfrom
cvas22:feat/1225-cell-name-env
Open

cvas22 wants to merge 1 commit into
runmedev:mainfrom
cvas22:feat/1225-cell-name-env

Conversation

@cvas22

@cvas22 cvas22 commented Oct 23, 2026

Copy link
Copy Markdown

Closes #1225

Code blocks that have a name now get it as RUNME_NAME in the process environment, so tasks started from a cell can link back to the cell that launched them.

  • Set for both runner services (v1 runner and v2 runnerv2service), from the existing KnownName of the execute request.
  • Only set when the block has a name.
  • It is added to the process environment only; it is not written to the session env store, so it does not leak into later blocks.

The issue suggests RUNME_CELL_NAME, but the maintainer comment there says RUNME_NAME was the likelier choice pending a collision check. I grepped the repo and found no existing use of RUNME_NAME, so I went with that. Happy to rename if you prefer the other.

Tests: added Test_runnerService/ExecuteKnownNameEnv and TestRunnerServiceServerExecute_KnownNameEnv, both pass on Linux. The remaining failures in ./runner, ./runnerv2service and ./command (JavaScript, Deno, Ruby, direnv and similar) happen on main too because those tools are missing in my environment.

When a code block has a name, set RUNME_NAME to it in the process
environment for both the v1 and v2 runner services. The variable is only
set for the process and is not stored in the session. Blocks without a
name do not get the variable.

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@sourishkrout
sourishkrout self-requested a review October 26, 2026 19:19
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.

[feature] Pass the cell name as an env var to the cell

1 participant