docs(agents): type slash commands into your own pane, name the session, trim the file - #211
Merged
Merged
Conversation
Slash commands are client-side: the agent never sees them as a tool call, so it cannot run them. But each session IS a tmux pane, so `tmux send-keys -t "$TMUX_PANE"` types into it. Verified with Claude Code `/rename`. Add two AGENTS.md sections: - the send-keys mechanism, with the literal-text flag and the two rules (the command runs after the current turn; non-commands become a message to self) - name the session before you start a task, and keep the user and the box in the name, because one box shows many sessions of many users in one web terminal The rename note stays vendor-neutral. Codex ships its own command set and its binary strings are compressed, so the text points at `/` and `--help` instead of naming a Codex command that may not exist. Goldens regenerated with `nix run .#update-golden`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3WmpdY3zc555sNdkY9dzQ
The file is @imported by every session of every user, so its size is a per-session context cost. Tighten the wording: shorter sentences, no rationale paragraphs, no repeated framing. Same sections and the same inline detail — every command, flag, path and rule stays, verified by diffing the backticked tokens before and after. 199 -> 176 lines, 10.1 -> 8.9 KB rendered. Goldens regenerated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3WmpdY3zc555sNdkY9dzQ
Owner
Author
|
Second commit: a prose trim of the whole seeded The file is
Same sections, same inline detail: every command, flag, path and rule stays. I verified that mechanically by extracting all backticked tokens from the rendered guide before and after — the set is unchanged. I did not move the webhook mechanics out to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two new sections in the seeded
AGENTS.md(modules/src/default-agents.md), so every session of every agent CLI gets them.Slash commands: type them into your own pane. Slash commands are client-side. The agent never sees them as a tool call, so it cannot run them the usual way. But each session IS a tmux pane, so it can type into itself:
Verified live in a Claude Code 2.1.226 session: the pane answered
Session renamed to: blah.Name your session for the work. Rename before you start a task, and keep the login name and the box host in the name. One box shows many sessions of many users in one web terminal, so a bare "review PR 42" says nothing about who or where. The section also states the limit: the name lives in the agent CLI, so a respawn loses it.
agent-box-session add NAME --agent claude -- -n "..."makes it permanent.Notes
/in the TUI and at--helpinstead of naming a Codex command that may not exist.nix run .#update-golden;module-generated-up-to-dateandmodule-single-filepass locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01T3WmpdY3zc555sNdkY9dzQ