Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,6 @@ Verified against the current tree; sources in parentheses.
typically the distribution shim (`~/.minimal/shim/bin/minimal`), distinct
from anything this repo builds (justfile comments,
`crates/minvmd/README.md`).
- **`min session attach -c` is not a general remote shell.** The daemon's exec
handler accepts only `min run <task>`, `min package build [args...]`, and
`min check [args...]` (plus the internal `git-receive-pack min://` path);
anything else fails the channel. Task
execs inherit the session's no-net/host-net mode, but an own-IP session's
task exec currently falls back to host networking; use an interactive
attach when the session's network identity matters
(`crates/minimald/src/exec.rs`).

## CI lane map

Expand Down
7 changes: 3 additions & 4 deletions crates/minimal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ pub struct AttachArgs {
#[arg(add = completion::session_completer())]
pub session: Option<String>,
/// Command to exec in the session context (non-interactive)
#[arg(long, short)]
#[arg(long, short, hide = true)]
pub command: Option<String>,
}

Expand Down Expand Up @@ -1797,8 +1797,7 @@ fn ensure_interactive_attach_tty(stdin_is_tty: bool) -> Result<(), anyhow::Error
} else {
bail!(
"`min session attach` needs an interactive terminal, but stdin is not a TTY. \
Run it from a terminal, or use `min session attach --command <cmd>` to run a \
single command non-interactively."
Run it from a terminal."
)
}
}
Expand Down Expand Up @@ -2695,7 +2694,7 @@ mod tests {
.unwrap_err()
.to_string();
assert!(
err.contains("not a TTY") && err.contains("--command"),
err.contains("not a TTY"),
"expected an actionable non-TTY error, got: {err}"
);
ensure_interactive_attach_tty(true).expect("a real terminal must pass the guard");
Expand Down
8 changes: 0 additions & 8 deletions docs/concepts/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ background, and `min session attach` rejoins it later. Changes you make inside s
the session's workspace; bring them back to the host by pushing them out with
`git push min://<session>`.

To run a declared task non-interactively instead of opening a shell, pass
`--command` (short `-c`). The command channel accepts only `min run <task name>`
invocations; arbitrary commands need an interactive shell:

```console
$ min session attach my-session -c 'min run test'
```

## How a session is composed

A session's contents are not hand-configured. They are **composed** from
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $ claude

Claude Code launches inside the session with your project's source code and a read-only system containing the `claude-code` binary and core utilities from `base`. The session has no additional access to anything on your host system unless you explicitly declare it.

Note that sessions are driven interactively: attaching needs a terminal, and the non-interactive `min session attach -c` channel accepts only `min run <task>` invocations. Launch the agent from inside an attached shell as shown above, rather than scripting it from the host.
Note that sessions are driven interactively: attaching needs a terminal. Launch the agent from inside an attached shell as shown above, rather than scripting it from the host.

## Adding more tools

Expand Down
5 changes: 1 addition & 4 deletions docs/reference/cli-min.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,13 @@ the current directory).
### `session attach`

```
min session attach [-c <COMMAND>] [SESSION]
min session attach [SESSION]
```

Attaches to an existing session, identified by UUID or session name. When
`SESSION` is omitted, `min session attach` resolves a session from the current
working directory (or the only existing session) and opens an interactive
picker if the choice is ambiguous (`--no-input` errors instead).
`-c/--command` execs a command in the session context non-interactively
instead of opening an interactive shell; the daemon accepts only
`min run <task name>` invocations on this channel, not arbitrary commands.

### `session destroy`

Expand Down