Expose cwd and session ID via env variables or allow /status to be run within custom commands

Resolved 💬 2 comments Opened Jan 5, 2026 by markgrover Closed Feb 4, 2026

What feature would you like to see?

Problem:
When making commits, I'd want to track which worktree (therefore cwd) and session ID (of codex CLI) did I use when creating this commit. I want to be able to supply this info and put it in the commit message itself.

Possible solutions:
Thus far I have been making the commit in a terminal and copy pasting the session ID, etc. in the commit message.
I am ok with a custom slash command but it seems like I can't run /status from within another custom command.
Alternatively, I looked to see if there were env variables like $SESSION_ID that I could access from within a custom slash commands and I wasn't able to find those either.

So, either exposing env variables or allow /status to be runnable from within a custom command would be very helpful.

Additional information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗