Skip to content

Set CODEBOX_SESSION in Podman boxes too - #94

Merged
guimou merged 1 commit into
mainfrom
feat/session-name-in-podman-boxes
Nov 20, 2026
Merged

guimou merged 1 commit into
mainfrom
feat/session-name-in-podman-boxes

Conversation

@guimou

@guimou guimou commented Nov 20, 2026

Copy link
Copy Markdown
Owner

A process inside a Podman box had no way to tell which session it is: the hostname is the launcher's name, and Podman only fills /run/.containerenv for privileged containers. The Apptainer backend already exported the session (container) name as CODEBOX_SESSION; the Podman backend did not.

What changes

  • CODEBOX_SESSION moves into the runtime-neutral session spec in lib/box-common.sh, so both backends set it. The Apptainer-only export is removed; its rendered command line is unchanged.
  • Docs: a line in docs/architecture.md and in the Multi-Session entry of AGENTS.md.

Why now

The Herdr cockpit gives each agent its own status file, named after the container, which it reads from outside in the terminal's podman run --name. Without the name inside the box, two agents in the same project both wrote the same file and neither was shown. The matching cockpit change is guimou/herdr-cockpit#11.

Tested

tests/render-test.sh passes (50 scenarios). The 31 Podman golden files are re-recorded with the one added -e CODEBOX_SESSION=... line each; the Apptainer golden files did not change.

Not run here: shellcheck (not installed in this environment, left to CI), and a real box.


Generated by Claude Code

A process inside a Podman box had no way to tell which session it is: the
hostname is the launcher's name, and Podman fills /run/.containerenv only
for privileged containers. The Apptainer backend already exported the
session (container) name as CODEBOX_SESSION.

Move it into the runtime-neutral session spec, so both backends set it.
Tools that read the name from outside, from the terminal's
'podman run --name', can then match what a process in the box reports:
the Herdr cockpit uses it to give each agent in a project its own status
file instead of a shared one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@guimou
guimou merged commit d00ff2e into main Nov 20, 2026
1 check passed
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.

2 participants