Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

Simplify injected Harness caller prompts

Call Whitea702bca8da0a
diff --git a/core/system_prompt_injection.py b/core/system_prompt_injection.py
index b74d4a101..fa1054abc 100644
--- a/core/system_prompt_injection.py
+++ b/core/system_prompt_injection.py
@@ -63,7 +63,7 @@ Current session id: `{default_session_id}`. Treat this as the authoritative Avib
"""
_FORKED_SESSION_PROMPT = """\
-This Agent Session was forked from `{source_session_id}`. The authoritative Avibe session id for this fork is `{default_session_id}`. If copied source context mentions another Avibe session id, treat it as historical source-context only and use `{default_session_id}` for Show Pages, Harness commands, tasks, watches, callbacks, and session updates.
+This Agent Session was forked from `{source_session_id}`. The authoritative Avibe session id for this fork is `{default_session_id}`. If copied source context mentions another Avibe session id, treat it as historical source-context only.
"""
@@ -74,17 +74,17 @@ When a visual page would help the user understand a problem, plan, process, resu
Each Agent Session has one Show Page. Get this session's page directory:
-`vibe show path --session-id $default_session_id`
+`vibe show path`
Check status:
-`vibe show status --session-id $default_session_id`
+`vibe show status`
Change visibility:
-`vibe show update --session-id $default_session_id --visibility public`
-`vibe show update --session-id $default_session_id --visibility private`
-`vibe show update --session-id $default_session_id --visibility offline`
+`vibe show update --visibility public`
+`vibe show update --visibility private`
+`vibe show update --visibility offline`
For more usage details, run `vibe show --help` or a subcommand help such as `vibe show update --help`.
$avibe_cloud_guidance_section
@@ -158,9 +158,6 @@ Relationship: Scope routes work; Agent defines who acts; Session holds continuit
### Current conversation
- Current session id: `{default_session_id}`
-- Current Agent backend: `{current_agent_backend}`
-
-The current session id `{default_session_id}` identifies this exact Agent Session. Use it for Show Pages, tasks, watches, or follow-ups that should continue this conversation. Do not treat it as a generic reply destination for every Agent run; a Session is a continuity container, not merely a delivery address.
### Inspecting Harness state
Use `vibe data query` to inspect Avibe state with guarded read-only SQL before changing a Harness: confirm existing Agents, Sessions, Runs, scopes, tasks, watches, and routing facts instead of guessing.
@@ -175,22 +172,24 @@ Useful Harness queries include schema discovery, current session lookup, existin
| Time trigger | `vibe task add` |
| External signal trigger | `vibe watch add` |
| Independent Agent delegation | `vibe agent run --agent <agent-name>` |
-| Same-session follow-up | `vibe agent run --session-id ...` |
+| Continue a pointed Session | `vibe agent run --session-id ...` |
| Branch from current Session context | `vibe agent run --fork-self ...` |
-| State/history inspection | `vibe data query`, `vibe runs list`, `vibe runs show` |
+| State/history inspection | `vibe data query`, `vibe runs list --current-session`, `vibe runs show` |
| Recurring specialist workflow | `vibe agent create/update` plus tasks, watches, or runs |
-`vibe task add` creates a time-triggered saved Agent message. Use `--cron "<expr>"` for recurrence or `--at "<ISO-8601>"` for one-off delivery; if `--timezone` is omitted, Avibe uses the local system timezone at creation time.
+`vibe task add` creates a time-triggered saved Agent message. Tasks created from an Avibe Agent shell continue this conversation by default. Use `--cron "<expr>"` for recurrence or `--at "<ISO-8601>"` for one-off delivery; if `--timezone` is omitted, Avibe uses the local system timezone at creation time. If `--cwd` is omitted for a task-created Session, Avibe follows the caller working directory when available.
-`vibe watch add` creates a managed monitor, usually backed by a small script or command, for any observable condition that must be watched until true: product signals, business events, files, logs, CI/reviews/deploys, service health, data freshness, and similar signals.
+`vibe watch add` creates a managed monitor, usually backed by a small script or command, for any observable condition that must be watched until true: product signals, business events, files, logs, CI/reviews/deploys, service health, data freshness, and similar signals. Watches created from an Avibe Agent shell follow up in this conversation by default. If `--cwd` is omitted, Avibe runs the waiter from the caller working directory when available.
-Use `vibe agent run --agent <agent-name> --message ...` when one Agent delegates work to another Agent. By default this creates a private/background Session, records this caller Session as the callback route, and waits synchronously unless `--async` is passed. Add `--same-scope` when the new Session should live under the same Workbench project or IM scope as the caller. Add `--scope-id <scopes.id>` only when placing the new Session in a specific existing scope.
+Use `vibe agent run --agent <agent-name> --message ...` when one Agent delegates work to another Agent. By default this creates a private/background Session for the target Agent and waits synchronously unless `--async` is passed. Avibe records caller provenance for both sync and async runs. From this Avibe Agent shell, async runs return their final result to this conversation by default; pass `--no-callback` only when you intentionally want to inspect the run later, and pass `--callback-session-id <id>` only to route the final result elsewhere. Add `--same-scope` when the new Session should live under the same Workbench project or IM scope as the caller. Add `--scope-id <scopes.id>` only when placing the new Session in a specific existing scope.
Use `vibe agent run --fork-self --message ...` when work should branch from this current Session's native backend context without mutating it. Use `--fork-session <source-session-id>` only when branching from a different explicit Session. Forks keep the source Session backend, scope, and cwd by default; `--agent`, `--model`, and `--reasoning-effort` may override the forked Session only when the backend stays the same.
-For tasks, use `--message "..."` or `--message-file <path>` as the stored message. For watches, use `--prefix "..."` for the follow-up instruction prepended before waiter stdout. `--post-to` is a delivery override, not session placement; avoid it unless a reply must be posted somewhere other than the target Session's normal delivery path.
+When `vibe agent run --session-id <id>` targets an existing Session, it sends a new message into that Session. It does not change that Session's cwd, scope, Agent, model, or reasoning settings; those properties belong to the Session itself. Use a new Session or a fork when those properties need to differ.
+
+For tasks, use `--message "..."` or `--message-file <path>` as the stored message. For watches, use `--message "..."` or `--message-file <path>` as the follow-up instruction template sent with waiter output. Prefer `--same-scope` or `--scope-id <scopes.id>` for new Session placement.
-Manage existing work with `vibe task <list|show|pause|resume|run|remove>`, `vibe watch <list|show|pause|resume|remove>`, and `vibe runs <list|show|cancel>`.
+Manage existing work with `vibe task <list|show|pause|resume|run|remove>`, `vibe watch <list|show|pause|resume|remove>`, and `vibe runs <list|show|cancel>`. For current-session run history, use `vibe runs list --current-session`. `vibe runs show` can default to the current Run from the injected environment; `vibe runs cancel` still requires an explicit run id.
The CLI exposes more options than this prompt lists. Before creating or changing Harness state, or whenever syntax/runtime effects are uncertain, read the relevant help: `vibe <command> --help` or `vibe <command> <subcommand> --help`.
@@ -205,7 +204,7 @@ Rules:
- `--fork-self` creates a new Agent Session from this current Session's native backend context; use it for alternate paths that need the current context but should not mutate this Session.
- `--fork-session <id>` creates a new Agent Session from that explicit source Session's native backend context.
- For another Agent doing an independent trial, comparison, delegation, or specialist subtask, use `vibe agent run --agent <agent-name> --message ...`.
-- Use `vibe agent run --agent <agent-name> --session-id ... --message ...` only to continue that same Session. Reuse the current session id only with Agents whose `Backend` matches `{current_agent_backend}`; otherwise use `--create-session`.
+- Use `vibe agent run --agent <agent-name> --session-id ... --message ...` only when the user intends to continue that same existing Session. Async callbacks return to this conversation by default.
- With `--fork-self` or `--fork-session`, pass `--agent`, `--model`, or `--reasoning-effort` only as forked-Session overrides, and only when the requested Agent backend matches the source Session backend.
- `--async` changes waiting behavior, not session identity: synchronous waits for the result; async runs in the background and is inspected later with `vibe runs`.
- Create or update Agents only when it captures a reusable role, reduces repeated prompting, or makes a long-running Harness more reliable.
@@ -218,20 +217,14 @@ On the Web chat the user composes with `@` / `#` autocomplete, which inserts sta
Treat these as the user pointing at that Agent or Session, and decide the action from context. Only the bracketed `@<...>` / `#<...>` forms are references; a bare `@` or `#` in prose is ordinary text.
"""
-_SESSION_END_PROMPT = """\
-
-## Current Session Reminder
-Current session id: `{default_session_id}`. Before using Show Page or Harness commands, target this exact session unless the user explicitly asks to target a different one.
-"""
-
_SESSION_TITLE_PROMPT = """\
## Session Title
When the topic of this Web conversation is clear, you may silently set one concise, human-scannable title for the current Session once. Before setting it, inspect the Session:
-`vibe session get {default_session_id}`
+`vibe session get`
If `metadata.title_source` is `user` or `agent`, leave the title unchanged; that means the title was deliberately set or cleared. Otherwise, set it once:
-`vibe session update {default_session_id} --title "<short title>"`
+`vibe session update --title "<short title>"`
Do not mention the title update unless the user asks, and do not repeatedly rename the same Session.
"""
@@ -412,11 +405,10 @@ def _build_session_end_prompt(
*,
fallback_platform: Optional[str] = None,
) -> str:
- default_session_id = _extract_default_session_id(context)
- prompt = _SESSION_END_PROMPT.format(default_session_id=default_session_id)
+ prompt = ""
platform = resolve_context_platform(context, fallback_platform=fallback_platform, default="<platform>")
if _is_web_platform(platform):
- prompt += _SESSION_TITLE_PROMPT.format(default_session_id=default_session_id)
+ prompt += _SESSION_TITLE_PROMPT
return prompt
diff --git a/docs/CLI.md b/docs/CLI.md
index 5c08c8f59..af2e5df28 100644
--- a/docs/CLI.md
+++ b/docs/CLI.md
@@ -207,8 +207,7 @@ vibe task remove <task-id>
Use `vibe task add --help` and `vibe task update --help` for the full command surface, including:
- `--session-id` for Agent Session continuity
-- `--post-to channel` to publish into the parent channel while keeping thread context
-- `--deliver-key` for an explicit delivery target
+- `--create-session`, `--create-session-per-run`, `--same-scope`, and `--scope-id` for Session placement
- `--cron` and `--at` scheduling
- `--name`, `--timezone`, and message file support
@@ -230,7 +229,7 @@ vibe agent run --agent release-reviewer --message 'Review the latest deployment
vibe agent run --async --no-callback --session-id sesk8m4q2p7x --message 'The export finished. Share the summary.'
vibe agent run --async --no-callback --fork-session sesk8m4q2p7x --message 'Explore this alternate fix from the current context.'
vibe agent run --async --session-id sesworker123 --callback-session-id sescaller456 --message 'Run the delegated investigation.'
-vibe agent run --async --no-callback --create-session --deliver-key slack::channel::C999 --agent release-reviewer --message 'Post the deployment summary.'
+vibe agent run --async --no-callback --create-session --scope-id slack::channel::C999 --agent release-reviewer --message 'Post the deployment summary.'
```
Use `--fork-session <session-id>` when a new Agent Session should branch from
@@ -238,8 +237,7 @@ an existing Session's native backend context instead of starting blank. The new
Session keeps the source backend. `--agent`, `--model`, and
`--reasoning-effort` can override the forked Session only when the Agent backend
stays the same; a cross-backend fork is rejected. Do not combine
-`--fork-session` with `--session-id`, `--create-session`, `--deliver-key`, or
-`--post-to`.
+`--fork-session` with `--session-id` or `--create-session`.
Async runs need an explicit callback policy unless the command is running inside
an Avibe-injected Agent environment. Use `--callback-session-id` when the final
@@ -289,9 +287,10 @@ The waiter command is passed positionally after `--` (or as a single shell
string via `--shell`). Use `vibe watch add --help` for the full surface,
including `--timeout` (per-cycle timeout in seconds), `--lifetime-timeout`
(total wall-clock limit), `--forever`, `--retry-exit-code`, `--retry-delay`,
-`--post-to channel`, `--deliver-key`, and `--name`. Watches share
-`--session-id`, `--post-to`, and `--deliver-key` semantics with `vibe task`
-and `vibe agent run`. `vibe watch remove` hides the watch from management
+`--name`, and session creation flags. Watches share `--session-id`,
+`--create-session`, `--create-session-per-run`, `--same-scope`, and `--scope-id`
+semantics with `vibe task`; direct `vibe agent run` uses `--create-session`
+for one-shot session creation. `vibe watch remove` hides the watch from management
views while preserving existing run history in SQLite. Prefer `vibe watch`
over ad-hoc `nohup` jobs when the
user wants a managed background task with a guaranteed follow-up message.
diff --git a/docs/CLI_ZH.md b/docs/CLI_ZH.md
index 7fdac3340..7ded4defc 100644
--- a/docs/CLI_ZH.md
+++ b/docs/CLI_ZH.md
@@ -189,8 +189,7 @@ vibe task remove <task-id>
更完整的参数说明请直接看 `vibe task add --help` 和 `vibe task update --help`。其中重点包括:
- 用 `--session-id` 指定要延续的 Agent Session
-- 用 `--post-to channel` 在保留 thread 上下文的同时把消息发到父频道
-- 用 `--deliver-key` 指定显式投递目标
+- 用 `--create-session`、`--create-session-per-run`、`--same-scope` 和 `--scope-id` 控制 Session placement
- 用 `--cron` / `--at` 控制定时方式
- 以及 `--name`、`--timezone`、`--message-file` 等参数
@@ -211,15 +210,14 @@ vibe agent run --agent release-reviewer --message 'Review the latest deployment
vibe agent run --async --no-callback --session-id sesk8m4q2p7x --message 'The export finished. Share the summary.'
vibe agent run --async --no-callback --fork-session sesk8m4q2p7x --message 'Explore this alternate fix from the current context.'
vibe agent run --async --session-id sesworker123 --callback-session-id sescaller456 --message 'Run the delegated investigation.'
-vibe agent run --async --no-callback --create-session --deliver-key slack::channel::C999 --agent release-reviewer --message 'Post the deployment summary.'
+vibe agent run --async --no-callback --create-session --scope-id slack::channel::C999 --agent release-reviewer --message 'Post the deployment summary.'
```
当一个新 Agent Session 需要从现有 Session 的 native backend 上下文分叉,而不是空白开始时,
使用 `--fork-session <session-id>`。新 Session 会保持源 Session 的 backend。
只有 backend 不变时,才可以通过 `--agent`、`--model`、`--reasoning-effort`
覆盖 fork 后 Session 的 Agent、模型或推理强度;跨 backend fork 会被拒绝。
-不要把 `--fork-session` 和 `--session-id`、`--create-session`、`--deliver-key`
-或 `--post-to` 混用。
+不要把 `--fork-session` 和 `--session-id` 或 `--create-session` 混用。
异步 run 需要明确 callback 策略,除非命令运行在 Avibe 已注入 caller context
的 Agent 环境内。当最终结果文本需要回到调用方 Session 时,使用
@@ -265,9 +263,10 @@ vibe watch remove <watch-id>
waiter 命令放在 `--` 后面;或者通过 `--shell` 传入一整段 shell 字符串。
完整参数请看 `vibe watch add --help`,包括 `--timeout`、`--lifetime-timeout`、
-`--forever`、`--retry-exit-code`、`--retry-delay`、`--post-to channel`、
-`--deliver-key` 和 `--name`。watch 与 `vibe task`、`vibe agent run` 共用
-`--session-id`、`--post-to` 和 `--deliver-key` 语义。需要可管理、可暂停、可查看的
+`--forever`、`--retry-exit-code`、`--retry-delay`、`--name` 和 session creation 参数。
+watch 与 `vibe task`、`vibe agent run` 共用 `--session-id`、`--create-session`、
+`--same-scope` 和 `--scope-id` 语义;`--create-session-per-run`
+只属于 `vibe task` 和 `vibe watch` 这类 stored definitions。需要可管理、可暂停、可查看的
后台等待任务时,优先使用 `vibe watch`,不要随手起 `nohup`。
### `vibe version`
diff --git a/docs/COMMANDS.md b/docs/COMMANDS.md
index cc309d5d1..733286d15 100644
--- a/docs/COMMANDS.md
+++ b/docs/COMMANDS.md
@@ -705,8 +705,8 @@ Important options:
- `--create-session`
- `--create-session-per-run`
- `--agent`
-- `--post-to {thread,channel}`
-- `--deliver-key`
+- `--same-scope`
+- `--scope-id`
- `--cron`
- `--at`
- `--message`
@@ -727,8 +727,8 @@ Important options:
- `--create-session`
- `--create-session-per-run`
- `--agent`
-- `--post-to {thread,channel}`
-- `--deliver-key`
+- `--same-scope`
+- `--scope-id`
- `--reset-delivery`
- `--cron`
- `--at`
@@ -826,24 +826,24 @@ Important options:
- `--session-id`
- `--fork-session`
- `--create-session`
-- `--deliver-key`
+- `--same-scope`
+- `--scope-id`
- `--model`
- `--reasoning-effort`
- `--async`
- `--message`
- `--message-file`
-If neither `--session-id` nor `--create-session` is provided, the run uses a
+If neither `--session-id` nor a creation policy is provided, the run uses a
private no-delivery session and is best suited for sub-agent style calls.
-`--deliver-key` is only meaningful with `--create-session`.
`--fork-session <session_id>` creates a new Agent Session by forking the source
Session's native backend context. It is for alternate investigations or
delegated work that should keep the source context without mutating the source
Session. Forks keep the same backend as the source; `--agent`, `--model`, and
`--reasoning-effort` may override the forked Session only when the backend does
-not change. Do not combine `--fork-session` with `--session-id`,
-`--create-session`, `--deliver-key`, or `--post-to`.
+not change. Do not combine `--fork-session` with `--session-id` or
+`--create-session`.
## 5.4 `vibe runs`
diff --git a/docs/COMMANDS_ZH.md b/docs/COMMANDS_ZH.md
index e1cb9eb69..6dba2279f 100644
--- a/docs/COMMANDS_ZH.md
+++ b/docs/COMMANDS_ZH.md
@@ -684,8 +684,8 @@ vibe task add (--session-id <session_id> | --create-session | --create-session-p
- `--create-session`
- `--create-session-per-run`
- `--agent`
-- `--post-to {thread,channel}`
-- `--deliver-key`
+- `--same-scope`
+- `--scope-id`
- `--cron`
- `--at`
- `--message`
@@ -706,8 +706,8 @@ vibe task update <task_id> [options]
- `--create-session`
- `--create-session-per-run`
- `--agent`
-- `--post-to {thread,channel}`
-- `--deliver-key`
+- `--same-scope`
+- `--scope-id`
- `--reset-delivery`
- `--cron`
- `--at`
@@ -802,23 +802,22 @@ vibe agent run (--session-id <session_id> | --create-session | --fork-session <s
- `--session-id`
- `--fork-session`
- `--create-session`
-- `--deliver-key`
+- `--same-scope`
+- `--scope-id`
- `--model`
- `--reasoning-effort`
- `--async`
- `--message`
- `--message-file`
-如果不传 `--session-id` 或 `--create-session`,run 会使用 private
-no-delivery session,更适合 sub-agent 调用。`--deliver-key` 只和
-`--create-session` 搭配使用。
+如果不传 `--session-id` 或创建策略,run 会使用 private
+no-delivery session,更适合 sub-agent 调用。
`--fork-session <session_id>` 会基于源 Session 的 native backend 上下文创建一个新的
Agent Session,适合在保留上下文的同时做分支调查或委派工作,而不修改源 Session。
fork 会保持源 Session 的 backend;只有 backend 不变时,`--agent`、`--model`
和 `--reasoning-effort` 才能覆盖 fork 后 Session 的 Agent、模型或推理强度。
-不要把 `--fork-session` 和 `--session-id`、`--create-session`、`--deliver-key`
-或 `--post-to` 混用。
+不要把 `--fork-session` 和 `--session-id` 或 `--create-session` 混用。
## 5.4 `vibe runs`
diff --git a/docs/plans/agent-run-callback-session.md b/docs/plans/agent-run-callback-session.md
index 4a11c2828..091487c28 100644
--- a/docs/plans/agent-run-callback-session.md
+++ b/docs/plans/agent-run-callback-session.md
@@ -96,7 +96,8 @@ Validation:
- Archived sessions are invalid.
- Callback to the same Session is allowed but should be documented as a loop
risk for automation authors.
-- `--callback-session-id` is orthogonal to `--post-to` and `--deliver-key`.
+- `--callback-session-id` is orthogonal to target Session selection and scope
+ placement.
Output payload should include:
@@ -111,9 +112,9 @@ Output payload should include:
### Internal/API Payload
-Carry `callback_session_id` through the same run-spec path as `session_id`,
-`post_to`, and `deliver_key`, so CLI, future UI/API creation, and persisted run
-history do not drift.
+Carry `callback_session_id` through the same run-spec path as `session_id` and
+scope placement, so CLI, future UI/API creation, and persisted run history do
+not drift.
## Data Model
diff --git a/docs/plans/agent-run-harness.md b/docs/plans/agent-run-harness.md
index dfbae8c20..82a74b02e 100644
--- a/docs/plans/agent-run-harness.md
+++ b/docs/plans/agent-run-harness.md
@@ -65,12 +65,12 @@ Continue an existing session:
vibe agent run --session-id sesk8m4q2p7x --message "Continue the investigation."
```
-Create a new session and deliver to a scope:
+Create a new session in a scope:
```bash
vibe agent run \
--create-session \
- --deliver-key slack::channel::C123 \
+ --scope-id slack::channel::C123 \
--message "Start a fresh incident triage."
```
@@ -82,13 +82,14 @@ Rules:
`--message` / `--message-file`.
- Exactly one message source is required.
- `--session-id` continues a conversation by public Vibe Session ID.
-- `--create-session` reserves a new Vibe Session ID. With `--deliver-key`, the
- session also has a delivery Scope; without `--deliver-key`, a direct Agent Run
+- `--create-session` reserves a new Vibe Session ID. With `--scope-id`, the
+ session is placed in that Scope; without scope placement, a direct Agent Run
creates a private/no-delivery session for agent harness or sub-agent usage and
requires explicit `--agent`, then returns `session_id` for later continuation.
- `--agent <name>` selects the Vibe Agent for this run. If omitted, resolve the
- Agent from the session or delivery Scope defaults.
-- `--deliver-key <scope-id>` sends the result to an IM scope.
+ Agent from the session or placement Scope defaults.
+- `--same-scope` places a new Session in the caller/source Scope.
+- `--scope-id <scope-id>` places a new Session in a specific existing Scope.
- `--async` returns after the run is queued.
- Without `--async`, the command waits for completion and prints the result.
@@ -138,7 +139,7 @@ Create a one-shot managed task:
vibe task add \
--at "2026-06-01T09:00:00+08:00" \
--create-session \
- --deliver-key slack::channel::C123 \
+ --scope-id slack::channel::C123 \
--message-file request.md
```
@@ -195,7 +196,7 @@ vibe watch add \
--retry-exit-code 75 \
--retry-delay 60 \
--create-session-per-run \
- --deliver-key slack::channel::C123 \
+ --scope-id slack::channel::C123 \
--message "A CI event finished. Review the waiter output." \
-- python3 scripts/wait_for_ci.py
```
@@ -252,9 +253,8 @@ RunSpec
session_id
scope_id
delivery_target:
- mode: none | scope | post_to
+ mode: none | scope
scope_id
- post_to
message:
text
payload_json
@@ -279,7 +279,7 @@ Background commands must keep three identities separate:
### Scope ID
-`--deliver-key` should mean `scopes.id`. It is not a session key.
+`--scope-id` uses `scopes.id`. It is not a session key.
Example shape:
@@ -296,7 +296,7 @@ lark::channel::oc_...
```
No separate thread anchor parameter is needed. If thread becomes a first-class
-Scope later, the same `--deliver-key <scope-id>` mechanism covers it.
+Scope later, the same `--scope-id <scope-id>` mechanism covers it.
### Session Policies
@@ -309,23 +309,23 @@ Existing session:
Create one reusable session:
```bash
---create-session --deliver-key <scope-id>
+--create-session --scope-id <scope-id>
```
Create a fresh session for every trigger execution:
```bash
---create-session-per-run --deliver-key <scope-id>
+--create-session-per-run --scope-id <scope-id>
```
Rules:
- `--session-id`, `--create-session`, and `--create-session-per-run` are
mutually exclusive.
-- `vibe agent run --create-session` may omit `--deliver-key` to create a
+- `vibe agent run --create-session` may omit scope placement to create a
private/no-delivery Session, but it must explicitly pass `--agent`. Managed
task/watch definitions that use `--create-session` or `--create-session-per-run`
- require `--deliver-key`.
+ require `--same-scope` or `--scope-id`.
- `--create-session` reserves a Vibe Session ID immediately. Runtime binds
backend-native state on the first execution.
- `--create-session-per-run` stores a policy on `run_definitions`; every
@@ -345,27 +345,23 @@ Rules:
| `--session-id` + `--create-session` | Reject | Reject | Reject | A run has one Session policy. |
| `--session-id` + `--create-session-per-run` | Reject | Reject | Reject | `existing` conflicts with `create_per_run`. |
| `--create-session` + `--create-session-per-run` | Reject | Reject | Reject | `create_once` conflicts with `create_per_run`. |
-| `--create-session` without `--deliver-key` | Allow only with `--agent` | Reject | Reject | Direct Agent Runs may create private/no-delivery Sessions, but the Agent must be explicit; managed definitions need a Scope when creating Sessions. |
-| `--create-session-per-run` without `--deliver-key` | N/A | Reject | Reject | Every per-run Session needs a Scope. |
+| `--create-session` without scope placement | Allow only with `--agent` | Reject | Reject | Direct Agent Runs may create private/no-delivery Sessions, but the Agent must be explicit; managed definitions need a Scope when creating Sessions. |
+| `--create-session-per-run` without scope placement | N/A | Reject | Reject | Every per-run Session needs a Scope. |
| `--create-session-per-run` + `task add --at` | N/A | Reject | N/A | One-shot tasks run once; use `--create-session`. |
-| `--deliver-key` + `--post-to` | Reject | Reject | Reject | One is an explicit Scope; the other is a shortcut. |
| `--agent` + `--session-id` | Allow if backend matches | Allow if backend matches | Allow if backend matches | `--agent` only overrides this run/definition and does not mutate the Session; reject if Agent backend differs from Session backend. |
-| `--agent` + `--deliver-key` | Allow | Allow | Allow | `--agent` overrides the Scope default Agent; `--deliver-key` controls delivery. |
+| `--agent` + `--scope-id` | Allow | Allow | Allow | `--agent` overrides the Scope default Agent; `--scope-id` controls placement. |
| `--async` + `--wait-timeout` | Reject | N/A | N/A | `--wait-timeout` only controls synchronous CLI waiting and does not control async run lifetime. |
### Delivery Policies
-For newly created sessions that should deliver to IM,
-`--deliver-key <scope-id>` is required because the CLI cannot infer an IM
-context safely. Direct `vibe agent run --create-session` without `--deliver-key`
-does not deliver to IM; it returns run/session output only.
+For newly created sessions that should live in an existing Scope, use
+`--same-scope` or `--scope-id <scope-id>` because the CLI cannot infer a safe IM
+or Workbench placement outside an injected caller context. Direct
+`vibe agent run --create-session` without scope placement creates a
+private/no-delivery Session and returns run/session output only.
-For existing sessions:
-
-- default delivery comes from the session;
-- `--post-to thread|channel` remains a convenience shortcut;
-- `--deliver-key <scope-id>` is the explicit delivery override;
-- `--post-to` and `--deliver-key` are mutually exclusive.
+For existing sessions, ordinary delivery comes from the Session's stored Scope.
+New help and docs should not teach one-off transport override flags.
### Runtime Target Resolution
@@ -375,8 +371,8 @@ Runtime target resolution is:
1. If `--agent <name>` is provided, load that Vibe Agent.
2. Otherwise, if `--session-id` is provided, use the session's current Agent
identity.
-3. Otherwise, resolve `--deliver-key` to a Scope and load the Scope's selected
- Vibe Agent.
+3. Otherwise, resolve `--same-scope` or `--scope-id` to a Scope and load the
+ Scope's selected Vibe Agent.
4. If no Scope Agent exists, use the configured system default Agent.
5. If both `--agent` and `--session-id` are provided, verify that the Agent
backend matches the Session backend; reject on mismatch because cross-backend
@@ -423,9 +419,9 @@ details:
| `agent_name` | New | Vibe Agent selected for future runs. | Make task/watch Agent selection explicit; if omitted, store the resolved Scope/session default. |
| `session_policy` | New | `existing`, `create_once`, or `create_per_run`. | Persist the lifecycle semantics for Session reuse/creation. |
| `session_id` | Existing | Existing or reserved Vibe Session ID when policy uses one. | Let future executions continue the same Vibe Session. |
-| `legacy_session_key` | Existing, compatibility | Legacy target from old records and commands. | Migration/display only; new writes prefer `session_id` / `deliver_key`. |
-| `deliver_key` | Existing, revised semantics | Delivery Scope ID. Domain/API name can be `delivery_scope_id` or `scope_id`. | Decouple delivery target from Session identity while keeping migration small. |
-| `post_to` | Existing | Delivery shortcut such as `thread` or `channel`. | Cover common delivery overrides without requiring full Scope IDs. |
+| `legacy_session_key` | Existing, compatibility | Legacy target from old records and commands. | Migration/display only; new writes prefer `session_id` / `scope_id`. |
+| `scope_id` | Target field | Session placement Scope ID. | Decouple placement from Session identity and make Scope selection explicit. |
+| legacy delivery fields | Existing, compatibility | Old delivery override columns. | Preserve old records and hidden compatibility inputs only; do not expose them in help, docs, prompts, or new examples. |
| `prompt` | Existing, compatibility | Legacy message template field. | Read/write compatibility during migration; target schema uses `message`. |
| `message` | New | Stored Agent message template. | Align storage with `--message` and separate user message from Agent system prompt. |
| `message_payload_json` | New | Optional structured message payload. | Support webhook/API structured input without overloading text. |
@@ -526,8 +522,8 @@ Field details:
| `session_policy` | New | Session resolution policy used for this run. | Explain how `session_id` was obtained. |
| `session_id` | Existing | Actual Vibe Session ID used by this run. | Continue conversation and query history by session. |
| `legacy_session_key` | Existing, compatibility | Legacy target for old imported runs. | Migration/display only. |
-| `deliver_key` | Existing, revised semantics | Delivery Scope ID snapshot. | Audit delivery target and query runs by Scope. |
-| `post_to` | Existing | Delivery shortcut snapshot. | Preserve thread/channel shortcut semantics. |
+| `scope_id` | Target field | Scope placement snapshot. | Audit placement and query runs by Scope. |
+| legacy delivery fields | Existing, compatibility | Old delivery override snapshots. | Preserve old run history only; new user-facing contracts should prefer Scope placement and Session callback fields. |
| `prompt` | Existing, compatibility | Legacy message field. | Read compatibility for old runs; target schema uses `message`. |
| `message` | New | Actual message sent to the Agent. | Align with `--message` and separate user message from system prompt. |
| `message_payload_json` | New | Optional structured payload. | Support webhook/API structured input. |
@@ -679,7 +675,7 @@ Task/Watch definition creation success:
"agent_name": "release-reviewer",
"session_policy": "create_once",
"session_id": "sesnew12345",
- "deliver_key": "slack::channel::C123",
+ "scope_id": "slack::channel::C123",
"next_run_at": "2026-06-01T09:00:00+08:00"
},
"warnings": []
diff --git a/docs/plans/agent-run-harness.zh.md b/docs/plans/agent-run-harness.zh.md
index 0ec97a09f..887622702 100644
--- a/docs/plans/agent-run-harness.zh.md
+++ b/docs/plans/agent-run-harness.zh.md
@@ -64,12 +64,12 @@ vibe agent run --agent release-reviewer --async --message-file request.md
vibe agent run --session-id sesk8m4q2p7x --message "Continue the investigation."
```
-创建新 Session 并投递到 Scope:
+在 Scope 中创建新 Session:
```bash
vibe agent run \
--create-session \
- --deliver-key slack::channel::C123 \
+ --scope-id slack::channel::C123 \
--message "Start a fresh incident triage."
```
@@ -80,13 +80,14 @@ vibe agent run \
传了它们,应拒绝命令,并明确提示改用 `--message` / `--message-file`。
- 必须且只能指定一个 message source。
- `--session-id` 通过公开 Vibe Session ID 继续对话。
-- `--create-session` 会预留一个新的 Vibe Session ID。带 `--deliver-key`
- 时,这个 Session 同时绑定 delivery Scope;不带 `--deliver-key` 时,direct
+- `--create-session` 会预留一个新的 Vibe Session ID。带 `--scope-id`
+ 时,这个 Session 会放到指定 Scope;不带 scope placement 时,direct
Agent Run 是 private/no-delivery Session,用于 agent harness/sub-agent
场景,必须显式传 `--agent`,并在输出里返回 `session_id` 供后续继续对话。
- `--agent <name>` 为这次 run 选择 Vibe Agent。如果不传,则从 session 或
- delivery Scope 的默认配置解析 Agent。
-- `--deliver-key <scope-id>` 把结果发送到 IM Scope。
+ placement Scope 的默认配置解析 Agent。
+- `--same-scope` 把新 Session 放到 caller/source Scope。
+- `--scope-id <scope-id>` 把新 Session 放到指定已有 Scope。
- `--async` 表示排队后立即返回。
- 不带 `--async` 时,命令等待完成并打印结果。
@@ -133,7 +134,7 @@ vibe task add \
vibe task add \
--at "2026-06-01T09:00:00+08:00" \
--create-session \
- --deliver-key slack::channel::C123 \
+ --scope-id slack::channel::C123 \
--message-file request.md
```
@@ -188,7 +189,7 @@ vibe watch add \
--retry-exit-code 75 \
--retry-delay 60 \
--create-session-per-run \
- --deliver-key slack::channel::C123 \
+ --scope-id slack::channel::C123 \
--message "A CI event finished. Review the waiter output." \
-- python3 scripts/wait_for_ci.py
```
@@ -243,9 +244,8 @@ RunSpec
session_id
scope_id
delivery_target:
- mode: none | scope | post_to
+ mode: none | scope
scope_id
- post_to
message:
text
payload_json
@@ -270,7 +270,7 @@ RunSpec
### Scope ID
-`--deliver-key` 应该表示 `scopes.id`。它不是 session key。
+`--scope-id` 使用 `scopes.id`。它不是 session key。
格式示例:
@@ -287,7 +287,7 @@ lark::channel::oc_...
```
不需要单独的 thread anchor 参数。如果未来 thread 成为一等 Scope,同样可以
-通过 `--deliver-key <scope-id>` 覆盖。
+通过 `--scope-id <scope-id>` 覆盖。
### Session Policies
@@ -300,22 +300,22 @@ lark::channel::oc_...
创建一个可复用的新 Session:
```bash
---create-session --deliver-key <scope-id>
+--create-session --scope-id <scope-id>
```
每次 trigger 执行都创建一个新 Session:
```bash
---create-session-per-run --deliver-key <scope-id>
+--create-session-per-run --scope-id <scope-id>
```
规则:
- `--session-id`、`--create-session`、`--create-session-per-run` 互斥。
-- `vibe agent run --create-session` 可以不带 `--deliver-key`,表示创建
+- `vibe agent run --create-session` 可以不带 scope placement,表示创建
private/no-delivery Session,但必须显式传 `--agent`;managed task/watch
definitions 中使用 `--create-session` 或 `--create-session-per-run` 时必须带
- `--deliver-key`。
+ `--same-scope` 或 `--scope-id`。
- `--create-session` 立即预留一个 Vibe Session ID。runtime 第一次执行时绑定
backend-native 状态。
- `--create-session-per-run` 在 `run_definitions` 上保存策略;每次执行都创建
@@ -334,26 +334,22 @@ lark::channel::oc_...
| `--session-id` + `--create-session` | 拒绝 | 拒绝 | 拒绝 | 一个 run 只能有一种 Session policy。 |
| `--session-id` + `--create-session-per-run` | 拒绝 | 拒绝 | 拒绝 | `existing` 和 `create_per_run` 生命周期冲突。 |
| `--create-session` + `--create-session-per-run` | 拒绝 | 拒绝 | 拒绝 | `create_once` 和 `create_per_run` 生命周期冲突。 |
-| `--create-session` without `--deliver-key` | 仅允许同时传 `--agent` | 拒绝 | 拒绝 | Direct Agent Run 可创建 private/no-delivery Session,但 Agent 必须显式;managed definitions 创建 Session 需要 Scope。 |
-| `--create-session-per-run` without `--deliver-key` | 不适用 | 拒绝 | 拒绝 | 每次创建新 Session 都需要 Scope。 |
+| `--create-session` without scope placement | 仅允许同时传 `--agent` | 拒绝 | 拒绝 | Direct Agent Run 可创建 private/no-delivery Session,但 Agent 必须显式;managed definitions 创建 Session 需要 Scope。 |
+| `--create-session-per-run` without scope placement | 不适用 | 拒绝 | 拒绝 | 每次创建新 Session 都需要 Scope。 |
| `--create-session-per-run` + `task add --at` | 不适用 | 拒绝 | 不适用 | one-shot task 只有一次执行,使用 `--create-session`。 |
-| `--deliver-key` + `--post-to` | 拒绝 | 拒绝 | 拒绝 | 一个是显式 Scope,一个是 shortcut。 |
| `--agent` + `--session-id` | backend 一致时允许 | backend 一致时允许 | backend 一致时允许 | `--agent` 只覆盖该次 run/definition,不修改 Session;若 Agent backend 和 Session backend 不同则拒绝。 |
-| `--agent` + `--deliver-key` | 允许 | 允许 | 允许 | `--agent` 覆盖 Scope 默认 Agent;`--deliver-key` 决定 delivery。 |
+| `--agent` + `--scope-id` | 允许 | 允许 | 允许 | `--agent` 覆盖 Scope 默认 Agent;`--scope-id` 决定 placement。 |
| `--async` + `--wait-timeout` | 拒绝 | 不适用 | 不适用 | `--wait-timeout` 只控制同步 CLI 等待,不控制 async run 生命周期。 |
### Delivery Policies
-创建需要投递到 IM 的新 Session 时,必须提供 `--deliver-key <scope-id>`,因为
-CLI 不能安全推断当前 IM 上下文。Direct `vibe agent run --create-session`
-不带 `--deliver-key` 时不做 IM 投递,只返回 run/session 输出。
+创建需要放进已有 Scope 的新 Session 时,使用 `--same-scope` 或
+`--scope-id <scope-id>`,因为 CLI 在没有 injected caller context 时不能安全推断
+IM 或 Workbench placement。Direct `vibe agent run --create-session` 不带 scope
+placement 时创建 private/no-delivery Session,只返回 run/session 输出。
-对于已有 Session:
-
-- 默认 delivery 来自 Session 自身;
-- `--post-to thread|channel` 继续作为便利快捷方式;
-- `--deliver-key <scope-id>` 是显式 delivery override;
-- `--post-to` 和 `--deliver-key` 互斥。
+对于已有 Session,常规 delivery 来自 Session 保存的 Scope。新的 help 和 docs
+不再教学一次性的 transport override flags。
### Runtime Target Resolution
@@ -361,7 +357,8 @@ CLI 不能安全推断当前 IM 上下文。Direct `vibe agent run --create-sess
1. 如果传了 `--agent <name>`,加载这个 Vibe Agent。
2. 否则,如果传了 `--session-id`,使用该 Session 当前的 Agent identity。
-3. 否则,把 `--deliver-key` 解析为 Scope,并读取 Scope 选择的 Vibe Agent。
+3. 否则,把 `--same-scope` 或 `--scope-id` 解析为 Scope,并读取 Scope 选择的
+ Vibe Agent。
4. 如果 Scope 没有选择 Agent,则使用系统默认 Agent。
5. 如果同时传了 `--agent` 和 `--session-id`,校验 Agent backend 和 Session
backend 一致;不一致时拒绝,因为跨 backend 无法保持上下文连续。
@@ -403,9 +400,9 @@ Session 后续默认 Agent。
| `agent_name` | 新增 | 这个 definition 创建 runs 时使用的 Vibe Agent 名称。 | 让 task/watch 明确选择 Agent;不传 `--agent` 时写入从 Scope/session 解析出的默认 Agent。 |
| `session_policy` | 新增 | `existing`、`create_once`、`create_per_run`。 | 把“继续已有 Session / 复用新 Session / 每次新 Session”的生命周期语义落成可查询字段。 |
| `session_id` | 现有 | `existing` 或 `create_once` policy 下的 Vibe Session ID。 | 保存已有或预留的 Session ID,后续执行能继续同一个 Vibe Session。 |
-| `legacy_session_key` | 现有,兼容 | 旧 `session_key` target。 | 只服务旧记录和旧命令迁移;新写入优先使用 `session_id` / `deliver_key`。 |
-| `deliver_key` | 现有,改义 | Delivery Scope ID。domain/API 层可叫 `delivery_scope_id` 或 `scope_id`。 | 让投递目标和 Session 身份分离;当前保留列名以降低迁移成本。 |
-| `post_to` | 现有 | `thread` / `channel` 这类 delivery shortcut。 | 覆盖最常见的投递调整,不需要用户手写完整 Scope ID。 |
+| `legacy_session_key` | 现有,兼容 | 旧 `session_key` target。 | 只服务旧记录和旧命令迁移;新写入优先使用 `session_id` / `scope_id`。 |
+| `scope_id` | 目标字段 | Session placement Scope ID。 | 让 placement 和 Session 身份分离,并显式表达 Scope 选择。 |
+| legacy delivery fields | 现有,兼容 | 旧 delivery override 列。 | 只保留旧记录和隐藏兼容输入;不要暴露在 help、docs、prompt 或新示例里。 |
| `prompt` | 现有,兼容 | 旧消息模板字段。 | 迁移期读写兼容;目标 schema 用 `message` 表达同一语义。 |
| `message` | 新增 | 保存的 Agent message template。 | 配合 CLI `--message`,避免和 Agent `system_prompt` 混淆。 |
| `message_payload_json` | 新增 | 可选结构化消息 payload。 | 为 webhook/API 触发保留结构化输入,不把文本 message 和 payload 混在一起。 |
@@ -501,8 +498,8 @@ Definition 表的迁移优先级:
| `session_policy` | 新增 | 本次 run 使用的 session resolution policy。 | 解释 `session_id` 是复用、预留还是 per-run 创建出来的。 |
| `session_id` | 现有 | 本次 run 实际使用的 Vibe Session ID。 | 支持继续对话、按 session 查历史。 |
| `legacy_session_key` | 现有,兼容 | 旧导入 runs 的兼容 target。 | 只用于迁移和兼容展示。 |
-| `deliver_key` | 现有,改义 | Delivery Scope ID snapshot。 | 记录结果投递目标,支持按 Scope 查 runs。 |
-| `post_to` | 现有 | Delivery shortcut snapshot。 | 保留 thread/channel 这类快捷投递语义。 |
+| `scope_id` | 目标字段 | Scope placement snapshot。 | 记录 placement,支持按 Scope 查 runs。 |
+| legacy delivery fields | 现有,兼容 | 旧 delivery override snapshot。 | 只保留旧 run history;新的 user-facing contract 应优先使用 Scope placement 和 Session callback 字段。 |
| `prompt` | 现有,兼容 | 旧消息字段。 | 迁移期兼容旧 run;目标 schema 用 `message`。 |
| `message` | 新增 | 发送给 Agent 的实际消息。 | 与 `--message` 对齐,并和 Agent system prompt 分离。 |
| `message_payload_json` | 新增 | 可选结构化 payload。 | 支持 webhook/API 传结构化输入。 |
@@ -645,7 +642,7 @@ Task/Watch definition 创建成功:
"agent_name": "release-reviewer",
"session_policy": "create_once",
"session_id": "sesnew12345",
- "deliver_key": "slack::channel::C123",
+ "scope_id": "slack::channel::C123",
"next_run_at": "2026-06-01T09:00:00+08:00"
},
"warnings": []
diff --git a/docs/plans/agent-run-scope-semantics.md b/docs/plans/agent-run-scope-semantics.md
index 6be2e2a78..abe0f7d26 100644
--- a/docs/plans/agent-run-scope-semantics.md
+++ b/docs/plans/agent-run-scope-semantics.md
@@ -4,7 +4,7 @@
The Harness CLI used to expose backend and transport details directly to
agents. In particular, `vibe agent run`, `vibe task`, and `vibe watch` relied on
-explicit session ids, delivery keys, and post targets even when Avibe already
+explicit session ids and legacy delivery-target syntax even when Avibe already
knows the calling Agent Session through `AVIBE_SESSION_ID`.
That made agents carry routing details in prompts instead of using the runtime
@@ -19,10 +19,9 @@ context as a first-class API.
- Scope placement is a session-level decision. It decides where a newly-created
session lives: a private/background scope, the caller/source scope, or a
specific `scopes.id`.
-- Message delivery overrides are not scope placement. `post-to` remains a reply
- delivery override; it does not move a session.
-- `deliver-key` is legacy transport syntax and should leave the agent-facing
- CLI surface. New commands should use `--scope-id` or `--same-scope`.
+- Message delivery overrides are not scope placement. Legacy transport
+ overrides should leave the agent-facing CLI surface.
+- New commands should use `--scope-id` or `--same-scope`.
## `vibe agent run` Defaults
@@ -98,8 +97,8 @@ runs, the route is only recorded for future detach-to-async behavior.
## Migration
-This batch removes `deliver-key` from recommended agent-facing help, prompt
-injection, and examples. Internal persistence can keep legacy field names until
-a later database cleanup. The CLI may continue accepting hidden legacy
-`--deliver-key` for compatibility, but new code paths write placement through
-`scope_id` semantics.
+This batch removes legacy delivery-target syntax from recommended agent-facing
+help, prompt injection, and examples. Internal persistence can keep legacy field
+names until a later database cleanup. The CLI may continue accepting hidden
+legacy placement input for compatibility, but new code paths write placement
+through `scope_id` semantics.
diff --git a/docs/plans/vibe-agent-catalog.md b/docs/plans/vibe-agent-catalog.md
index 5f98a2e10..2330c82ee 100644
--- a/docs/plans/vibe-agent-catalog.md
+++ b/docs/plans/vibe-agent-catalog.md
@@ -346,7 +346,7 @@ prefix parsing.
### Background New Sessions
-For `--create-session --deliver-key <scope-id>`:
+For `--create-session --scope-id <scope-id>`:
1. Resolve `scope_id`.
2. Resolve scope's Vibe Agent.
@@ -471,8 +471,8 @@ decision. Existing users may need to select/import/create Vibe Agents again.
- `agent-run-harness.md`: `vibe agent run` is the direct/manual execution
surface. It consumes Vibe Agent definitions from this catalog instead of
accepting backend/model/effort overrides.
-- Delivery targeting is owned by `agent-run-harness.md`: `--deliver-key`
- becomes `scopes.id`, not a legacy session key.
+- Scope placement is owned by `agent-run-harness.md`: `--scope-id` uses
+ `scopes.id`, not a legacy session key.
## Implementation Slices
diff --git a/docs/plans/vibe-agent-catalog.zh.md b/docs/plans/vibe-agent-catalog.zh.md
index 5d1e841e2..cf9294593 100644
--- a/docs/plans/vibe-agent-catalog.zh.md
+++ b/docs/plans/vibe-agent-catalog.zh.md
@@ -328,7 +328,7 @@ Session = one ongoing conversation/run under that scope and Agent.
### Background New Sessions
-对于 `--create-session --deliver-key <scope-id>`:
+对于 `--create-session --scope-id <scope-id>`:
1. 解析 `scope_id`。
2. 解析 Scope 的 Vibe Agent。
@@ -449,7 +449,7 @@ agent_sessions.agent_id / agent_name snapshot fields
- `agent-run-harness.md`:`vibe agent run` 是 direct/manual execution 入口。
它消费本 catalog 里的 Vibe Agent 定义,而不是接受 backend/model/effort
override 参数。
-- Delivery targeting 由 `agent-run-harness.md` 负责:`--deliver-key` 变成
+- Scope placement 由 `agent-run-harness.md` 负责:`--scope-id` 使用
`scopes.id`,不是 legacy session key。
## 实施切片
diff --git a/tests/test_claude_cli_path.py b/tests/test_claude_cli_path.py
index 003044bec..d5be2e3ae 100644
--- a/tests/test_claude_cli_path.py
+++ b/tests/test_claude_cli_path.py
@@ -239,7 +239,8 @@ def test_session_handler_sets_claude_fork_session_for_pending_native_fork(monkey
assert "Current session id: `ses-target`" in prompt
assert "This Agent Session was forked from `ses-source`." in prompt
assert "The authoritative Avibe session id for this fork is `ses-target`." in prompt
- assert "use `ses-target` for Show Pages" in prompt
+ assert "treat it as historical source-context only" in prompt
+ assert "use `ses-target` for Show Pages" not in prompt
def test_session_handler_disallows_remote_unsafe_claude_tools(monkeypatch, tmp_path: Path) -> None:
@@ -305,7 +306,8 @@ def test_session_handler_ensures_agent_session_id_before_prompt(
prompt = prompt_value["append"] if isinstance(prompt_value, dict) else prompt_value
assert captured["connected"] is True
assert "Current session id: `sesk8m4q2p7x`" in prompt
- assert "--session-id sesk8m4q2p7x" in prompt
+ assert "`vibe show path`" in prompt
+ assert "--session-id sesk8m4q2p7x" not in prompt
assert "--session-key" not in prompt
diff --git a/tests/test_cli_task_command.py b/tests/test_cli_task_command.py
index 42b267ce1..4dc04ada2 100644
--- a/tests/test_cli_task_command.py
+++ b/tests/test_cli_task_command.py
@@ -182,7 +182,7 @@ def test_task_help_describes_session_id_guidance(capsys) -> None:
assert exc.value.code == 0
captured = capsys.readouterr()
assert "Create, inspect, and control scheduled Agent messages for Avibe." in captured.out
- assert "vibe task add --session-id sesk8m4q2p7x" in captured.out
+ assert "vibe task add --session-id sesk8m4q2p7x --cron '0 * * * *' --message" in captured.out
assert "{add,update,list,show,pause,resume,run,remove}" in captured.out
assert "rm (remove)" not in captured.out
assert "\n ls" not in captured.out
@@ -198,7 +198,8 @@ def test_task_add_help_includes_examples_and_threadless_guidance(capsys) -> None
captured = capsys.readouterr()
assert "If this is your first time using this command, read this whole help entry before creating a task." in captured.out
assert "`--session-id` chooses which Agent Session Avibe will continue using when the task runs." in captured.out
- assert "--post-to" in captured.out
+ assert "tasks continue this conversation by default" in captured.out
+ assert "--post-to" not in captured.out
assert "--same-scope" in captured.out
assert "--scope-id" in captured.out
assert "--deliver-key" not in captured.out
@@ -217,11 +218,10 @@ def test_hook_send_help_describes_runtime_effects(capsys) -> None:
assert "`vibe hook send` is a compatibility entrypoint." in captured.out
assert "New automation should use `vibe agent run --async`." in captured.out
assert "`vibe hook send` queues one deprecated asynchronous compatibility turn" in captured.out
- assert "`--post-to channel` changes where the message is posted, not which session is continued." in captured.out
+ assert "--post-to" not in captured.out
assert "`--message` and `--message-file` provide the one-shot async user message that will be queued immediately." in captured.out
assert "--session-id" in captured.out
- assert "vibe agent run --async --session-id sesk8m4q2p7x --no-callback" in captured.out
- assert "--callback-session-id sescaller123" in captured.out
+ assert "vibe agent run --async --session-id sesk8m4q2p7x --no-callback --message" in captured.out
def test_task_list_help_mentions_completed_one_shots_hidden_by_default(capsys) -> None:
@@ -261,7 +261,7 @@ def test_hook_send_help_includes_examples_and_threadless_guidance(capsys) -> Non
assert exc.value.code == 0
captured = capsys.readouterr()
assert "`vibe hook send` queues one deprecated asynchronous compatibility turn" in captured.out
- assert "--post-to" in captured.out
+ assert "--post-to" not in captured.out
assert "--deliver-key" not in captured.out
assert "--session-id" in captured.out
assert "vibe agent run --async --session-id sesk8m4q2p7x --no-callback" in captured.out
@@ -280,10 +280,23 @@ def test_agent_run_help_includes_fork_session_guidance(capsys) -> None:
assert "--same-scope" in captured.out
assert "--scope-id" in captured.out
assert "--deliver-key" not in captured.out
- assert "--fork-self forks the current caller Session from AVIBE_SESSION_ID." in captured.out
+ assert "--fork-self forks this current Session." in captured.out
assert "Forks keep the same backend, scope, and cwd as the source Session." in captured.out
assert "vibe agent run --async --fork-self --message" in captured.out
- assert "Do not combine fork flags with --session-id, --create-session, or --create-session-per-run." in captured.out
+ assert "vibe agent run --agent release-reviewer --message 'Review the latest deployment result.'" in captured.out
+ assert (
+ "vibe agent run --agent release-reviewer --same-scope --message 'Review this project in a visible sibling Session.'"
+ in captured.out
+ )
+ assert "vibe agent run --agent release-reviewer --no-callback --message" not in captured.out
+ assert "vibe agent run --agent release-reviewer --same-scope --no-callback --message" not in captured.out
+ assert "From an Avibe Agent shell, async runs return their final result to this conversation by default." in captured.out
+ assert "From a normal terminal, pass --callback-session-id or --no-callback for async runs." in captured.out
+ assert "Review the latest CI result and report back." in captured.out
+ assert "--callback-session-id sescaller456 --message 'Review the latest CI result and report back.'" in captured.out
+ assert "--no-callback --message 'Review the latest CI result and report back.'" not in captured.out
+ assert "Do not combine fork flags with --session-id or --create-session." in captured.out
+ assert "--create-session-per-run" not in captured.out
def test_task_add_parse_error_is_structured_json(capsys) -> None:
@@ -763,7 +776,7 @@ def test_task_add_defaults_target_to_caller_session(tmp_path: Path, capsys) -> N
assert payload["task"]["session_policy"] == "existing"
assert payload["session_default_notice"] == {
"code": "session_defaulted_to_caller",
- "message": "Task target Session defaulted to the caller Session from AVIBE_SESSION_ID.",
+ "message": "Task target Session defaulted to this Agent Session.",
"session_id": "sesCaller",
}
diff --git a/tests/test_cli_watch_command.py b/tests/test_cli_watch_command.py
index 85645d2b5..a96a85cd7 100644
--- a/tests/test_cli_watch_command.py
+++ b/tests/test_cli_watch_command.py
@@ -65,7 +65,7 @@ def test_watch_help_describes_session_id_guidance(capsys) -> None:
assert exc.value.code == 0
captured = capsys.readouterr()
assert "managed background watchers" in captured.out
- assert "vibe watch add --session-id sesk8m4q2p7x" in captured.out
+ assert "vibe watch add --session-id sesk8m4q2p7x --name 'Wait for export' --message" in captured.out
assert "{add,update,list,show,pause,resume,remove}" in captured.out
@@ -79,10 +79,15 @@ def test_watch_add_help_mentions_shell_and_lifetime_timeout(capsys) -> None:
captured = capsys.readouterr()
assert "Pass either --shell '<command>' or a command after '--'." in captured.out
assert "--lifetime-timeout" in captured.out
- assert "vibe watch add --session-id sesk8m4q2p7x" in captured.out
- assert "`--prefix` becomes the instruction text of the follow-up hook." in captured.out
+ assert "vibe watch add --session-id sesk8m4q2p7x --message 'The export finished. Inspect it and continue.'" in captured.out
+ assert "watches follow up in this conversation by default" in captured.out
+ assert "Prefer --message or --message-file for follow-up instructions" in captured.out
assert "Terminal failures also send a follow-up and disable the watch." in captured.out
assert "If this is your first time using this command, read this whole help entry before creating a watch." in captured.out
+ assert "--same-scope" in captured.out
+ assert "--scope-id" in captured.out
+ assert "--post-to" not in captured.out
+ assert "--deliver-key" not in captured.out
def test_watch_add_parser_keeps_top_level_command_name() -> None:
@@ -475,7 +480,7 @@ def test_watch_add_defaults_target_to_caller_session(tmp_path: Path, capsys) ->
assert payload["watch"]["session_policy"] == "existing"
assert payload["session_default_notice"] == {
"code": "session_defaulted_to_caller",
- "message": "Watch target Session defaulted to the caller Session from AVIBE_SESSION_ID.",
+ "message": "Watch target Session defaulted to this Agent Session.",
"session_id": "sesCaller",
}
diff --git a/tests/test_codex_agent.py b/tests/test_codex_agent.py
index 68fd0dbf4..c15daefb2 100644
--- a/tests/test_codex_agent.py
+++ b/tests/test_codex_agent.py
@@ -1361,7 +1361,7 @@ class CodexAgentPayloadTests(unittest.IsolatedAsyncioTestCase):
self.assertEqual(params["threadId"], "thread-existing")
developer_instructions = params["developerInstructions"]
self.assertEqual(developer_instructions.count("Focus on regressions."), 1)
- self.assertEqual(developer_instructions.count("Current session id:"), 3)
+ self.assertEqual(developer_instructions.count("Current session id:"), 2)
self.assertNotIn("Legacy session key:", developer_instructions)
self.assertNotIn("--session-key", developer_instructions)
self.assertEqual(developer_instructions.count("If you generate an image with Codex"), 1)
@@ -1549,7 +1549,8 @@ class CodexAgentPayloadTests(unittest.IsolatedAsyncioTestCase):
"The authoritative Avibe session id for this fork is `ses-target`.",
developer_instructions,
)
- self.assertIn("use `ses-target` for Show Pages", developer_instructions)
+ self.assertIn("treat it as historical source-context only", developer_instructions)
+ self.assertNotIn("use `ses-target` for Show Pages", developer_instructions)
inject_method, inject_params = transport.send_request.await_args_list[1].args
self.assertEqual(inject_method, "thread/inject_items")
self.assertEqual(inject_params["threadId"], "thread-fork")
diff --git a/tests/test_multi_platform_runtime.py b/tests/test_multi_platform_runtime.py
index 02d29cf7d..07446594b 100644
--- a/tests/test_multi_platform_runtime.py
+++ b/tests/test_multi_platform_runtime.py
@@ -1056,7 +1056,8 @@ def test_opencode_fork_prompt_marks_target_session_id_authoritative():
assert "Current session id: `ses-target`" in system
assert "This Agent Session was forked from `ses-source`." in system
assert "The authoritative Avibe session id for this fork is `ses-target`." in system
- assert "use `ses-target` for Show Pages" in system
+ assert "treat it as historical source-context only" in system
+ assert "use `ses-target` for Show Pages" not in system
def test_opencode_normal_text_matching_legacy_question_prefix_is_processed():
diff --git a/tests/test_reply_enhancer_platform.py b/tests/test_reply_enhancer_platform.py
index 0ad76365a..250411868 100644
--- a/tests/test_reply_enhancer_platform.py
+++ b/tests/test_reply_enhancer_platform.py
@@ -295,7 +295,10 @@ class ReplyEnhancerPlatformTests(unittest.IsolatedAsyncioTestCase):
)
self.assertIn("## Show Pages", prompt)
- self.assertIn("`vibe show path --session-id sesk8m4q2p7x`", prompt)
+ self.assertIn("`vibe show path`", prompt)
+ self.assertIn("`vibe show status`", prompt)
+ self.assertIn("`vibe show update --visibility private`", prompt)
+ self.assertNotIn("`vibe show path --session-id sesk8m4q2p7x`", prompt)
self.assertIn("Make the page work reasonably on mobile", prompt)
self.assertIn("managed React/Vite apps", prompt)
self.assertNotIn("Ready to visualize", prompt)
@@ -318,10 +321,11 @@ class ReplyEnhancerPlatformTests(unittest.IsolatedAsyncioTestCase):
self.assertIn("| Session | Continuing context for one Agent work lineage | Work should continue or fork context |", prompt)
self.assertIn("Relationship: Scope routes work; Agent defines who acts; Session holds continuity", prompt)
self.assertIn("Current session id: `sesk8m4q2p7x`", prompt)
- self.assertEqual(prompt.count("Current session id: `sesk8m4q2p7x`"), 3)
- self.assertIn("Current Agent backend: `codex`", prompt)
- self.assertIn("identifies this exact Agent Session", prompt)
- self.assertIn("a Session is a continuity container, not merely a delivery address", prompt)
+ self.assertEqual(prompt.count("Current session id: `sesk8m4q2p7x`"), 2)
+ self.assertNotIn("Current Agent backend", prompt)
+ self.assertNotIn("copying `sesk8m4q2p7x` into the command", prompt)
+ self.assertNotIn("generic reply destination", prompt)
+ self.assertNotIn("delivery address", prompt)
self.assertNotIn("Legacy session key:", prompt)
self.assertNotIn("--session-key", prompt)
self.assertNotIn("Channel-level session key:", prompt)
@@ -331,16 +335,23 @@ class ReplyEnhancerPlatformTests(unittest.IsolatedAsyncioTestCase):
self.assertIn("schema discovery, current session lookup, existing task/watch inspection, Agent run history", prompt)
self.assertIn("### Choosing the right Harness shape", prompt)
self.assertIn("| Independent Agent delegation | `vibe agent run --agent <agent-name>` |", prompt)
- self.assertIn("| Same-session follow-up | `vibe agent run --session-id ...` |", prompt)
+ self.assertIn("| Continue a pointed Session | `vibe agent run --session-id ...` |", prompt)
self.assertIn("| Branch from current Session context | `vibe agent run --fork-self ...` |", prompt)
+ self.assertIn("Tasks created from an Avibe Agent shell continue this conversation by default", prompt)
self.assertIn("`vibe task add` creates a time-triggered saved Agent message", prompt)
+ self.assertIn("Watches created from an Avibe Agent shell follow up in this conversation by default", prompt)
self.assertIn("`vibe watch add` creates a managed monitor", prompt)
self.assertIn("product signals, business events, files, logs, CI/reviews/deploys", prompt)
self.assertIn("Use `vibe agent run --agent <agent-name> --message ...` when one Agent delegates work", prompt)
+ self.assertIn("From this Avibe Agent shell, async runs return their final result to this conversation by default", prompt)
self.assertIn("Add `--same-scope` when the new Session should live under the same Workbench project or IM scope", prompt)
self.assertIn("Use `vibe agent run --fork-self --message ...` when work should branch from this current Session", prompt)
self.assertIn("Forks keep the source Session backend, scope, and cwd by default", prompt)
- self.assertIn("`--post-to` is a delivery override, not session placement", prompt)
+ self.assertIn("It does not change that Session's cwd, scope, Agent, model, or reasoning settings", prompt)
+ self.assertNotIn("`--prefix` is legacy-compatible", prompt)
+ self.assertNotIn("`--post-to` is a delivery override", prompt)
+ self.assertIn("Prefer `--same-scope` or `--scope-id <scopes.id>` for new Session placement", prompt)
+ self.assertNotIn("--deliver-key", prompt)
self.assertIn("Manage existing work with `vibe task <list|show|pause|resume|run|remove>`", prompt)
self.assertIn("`vibe watch <list|show|pause|resume|remove>`", prompt)
self.assertIn("`vibe runs <list|show|cancel>`", prompt)
@@ -361,7 +372,8 @@ class ReplyEnhancerPlatformTests(unittest.IsolatedAsyncioTestCase):
self.assertIn("`--fork-session <id>` creates a new Agent Session from that explicit source Session's native backend context", prompt)
self.assertIn("vibe agent run --agent <agent-name> --message ...", prompt)
self.assertIn("vibe agent run --agent <agent-name> --session-id ... --message ...", prompt)
- self.assertIn("Reuse the current session id only with Agents whose `Backend` matches `codex`; otherwise use `--create-session`", prompt)
+ self.assertIn("Async callbacks return to this conversation by default", prompt)
+ self.assertNotIn("Reuse an existing Session only with Agents whose `Backend` matches", prompt)
self.assertIn("With `--fork-self` or `--fork-session`, pass `--agent`, `--model`, or `--reasoning-effort` only as forked-Session overrides", prompt)
self.assertIn("`--async` changes waiting behavior, not session identity", prompt)
self.assertIn("inspected later with `vibe runs`", prompt)
@@ -442,7 +454,8 @@ class ReplyEnhancerPlatformTests(unittest.IsolatedAsyncioTestCase):
context=context,
)
- self.assertIn("`vibe show path --session-id sesk8m4q2p7x`", prompt)
+ self.assertIn("`vibe show path`", prompt)
+ self.assertNotIn("`vibe show path --session-id sesk8m4q2p7x`", prompt)
self.assertIn("export async function GET(request) { return Response.json({ ok: true }) }", prompt)
def test_prompt_uses_fallback_platform_for_unannotated_context(self):
diff --git a/tests/test_session_cli.py b/tests/test_session_cli.py
index 4bc0168f3..0f3cf5262 100644
--- a/tests/test_session_cli.py
+++ b/tests/test_session_cli.py
@@ -137,7 +137,7 @@ def test_get_defaults_to_caller_session(monkeypatch, tmp_path, capsys):
assert payload["session"]["id"] == "sesaaa"
assert payload["session_default_notice"] == {
"code": "session_defaulted_to_caller",
- "message": "Session defaulted to the caller Session from AVIBE_SESSION_ID.",
+ "message": "Session defaulted to this Agent Session.",
"session_id": "sesaaa",
}
@@ -151,6 +151,7 @@ def test_get_requires_session_without_caller(monkeypatch, tmp_path, capsys):
assert code == 1
assert payload["code"] == "missing_session_target"
assert payload["help_command"] == "vibe session get --help"
+ assert payload["hint"] == "Run this command from an Avibe Agent shell, or pass the target Session ID positionally."
def test_get_archived_is_not_found(monkeypatch, tmp_path, capsys):
@@ -196,7 +197,7 @@ def test_update_defaults_to_caller_session(monkeypatch, tmp_path, capsys):
assert payload["session"]["title"] == "New name"
assert payload["session_default_notice"] == {
"code": "session_defaulted_to_caller",
- "message": "Session defaulted to the caller Session from AVIBE_SESSION_ID.",
+ "message": "Session defaulted to this Agent Session.",
"session_id": "sesaaa",
}
@@ -210,6 +211,7 @@ def test_update_requires_session_without_caller(monkeypatch, tmp_path, capsys):
assert code == 1
assert payload["code"] == "missing_session_target"
assert payload["help_command"] == "vibe session update --help"
+ assert payload["hint"] == "Run this command from an Avibe Agent shell, or pass the target Session ID positionally."
def test_update_empty_title_clears(monkeypatch, tmp_path, capsys):
@@ -301,12 +303,13 @@ def _injection_for(session_id, *, platform="avibe", platform_specific=None):
return build_system_prompt_injection(context=ctx)
-def test_web_title_prompt_is_fixed_and_uses_session_id():
+def test_web_title_prompt_defaults_to_current_session():
out = _injection_for("sesweb")
assert "## Session Title" in out
- # the command carries the REAL session id (not a <id> placeholder)
- assert "vibe session get sesweb" in out
- assert 'vibe session update sesweb --title "<short title>"' in out
+ assert "`vibe session get`" in out
+ assert '`vibe session update --title "<short title>"`' in out
+ assert "vibe session get sesweb" not in out
+ assert 'vibe session update sesweb --title "<short title>"' not in out
assert "metadata.title_source" in out
assert "`user` or `agent`" in out
assert "leave the title unchanged" in out
@@ -320,7 +323,7 @@ def test_im_title_prompt_is_not_injected():
out = _injection_for("sesim", platform="slack")
assert "## Session Title" not in out
assert "vibe session update sesim --title" not in out
- assert "Current Session Reminder" in out # the reminder itself still renders
+ assert "Current Session Reminder" not in out
def test_forked_session_prompt_marks_target_session_id_authoritative():
@@ -342,7 +345,8 @@ def test_forked_session_prompt_marks_target_session_id_authoritative():
assert "This Agent Session was forked from `sessource`." in out
assert "The authoritative Avibe session id for this fork is `sestarget`." in out
assert "If copied source context mentions another Avibe session id" in out
- assert "use `sestarget` for Show Pages, Harness commands, tasks, watches, callbacks, and session updates" in out
+ assert "treat it as historical source-context only" in out
+ assert "for Show Pages, Harness commands, tasks, watches, callbacks, and session updates" not in out
def test_forked_session_prompt_can_use_persisted_metadata():
diff --git a/tests/test_show_pages.py b/tests/test_show_pages.py
index 34967f393..4f4f17e95 100644
--- a/tests/test_show_pages.py
+++ b/tests/test_show_pages.py
@@ -52,6 +52,19 @@ def test_show_without_subcommand_prints_help(capsys):
assert "vibe show path --session-id sesk8m4q2p7x" in captured.out
+def test_show_path_help_uses_explicit_session_id(capsys):
+ parser = cli.build_parser()
+
+ with pytest.raises(SystemExit) as exc:
+ parser.parse_args(["show", "path", "--help"])
+
+ assert exc.value.code == 0
+ captured = capsys.readouterr()
+ assert "Run: vibe show path --session-id sesk8m4q2p7x" in captured.out
+ assert "`vibe show update --session-id sesk8m4q2p7x --visibility public`" in captured.out
+ assert "Run: vibe show path\n" not in captured.out
+
+
def test_runtime_prepare_cli_reports_warning_only_failure(monkeypatch, capsys):
parser = cli.build_parser()
args = parser.parse_args(["runtime", "prepare", "--json"])
@@ -661,7 +674,7 @@ def test_show_path_defaults_to_caller_session(monkeypatch, tmp_path, capsys):
assert payload["session_id"] == "sesCaller"
assert payload["session_default_notice"] == {
"code": "session_defaulted_to_caller",
- "message": "Show Page session defaulted to the caller Session from AVIBE_SESSION_ID.",
+ "message": "Show Page session defaulted to this Agent Session.",
"session_id": "sesCaller",
}
assert (tmp_path / "show" / "sesCaller" / "index.html").exists()
diff --git a/vibe/cli.py b/vibe/cli.py
index 7b93b7014..0d2c04457 100644
--- a/vibe/cli.py
+++ b/vibe/cli.py
@@ -263,8 +263,8 @@ def _task_examples_text() -> str:
vibe task add --session-id sesk8m4q2p7x --cron '0 * * * *' --message 'Share the hourly summary.'
vibe task update 12ab34cd56ef --cron '*/30 * * * *' --name 'Half-hour summary'
vibe task run 12ab34cd56ef
- vibe task add --session-id sesk8m4q2p7x --post-to channel --cron '*/5 * * * *' --message 'Tell a new joke each time.'
- vibe task add --session-id sesk8m4q2p7x --at '2026-03-31T09:00:00+08:00' --message-file briefing.md
+ vibe task add --create-session --scope-id slack::channel::C123 --cron '*/5 * * * *' --message 'Tell a new joke each time.'
+ vibe task add --create-session --scope-id slack::channel::C123 --at '2026-03-31T09:00:00+08:00' --message-file briefing.md
"""
)
@@ -274,15 +274,14 @@ def _task_add_examples_text() -> str:
"""\
Session target:
Use --session-id with the target Agent Session ID, for example sesk8m4q2p7x.
- Inside an Avibe Agent shell, omit --session-id to default to the caller Session from AVIBE_SESSION_ID.
+ Inside an Avibe Agent shell, tasks continue this conversation by default.
Guidance:
If this is your first time using this command, read this whole help entry before creating a task.
`--session-id` chooses which Agent Session Avibe will continue using when the task runs.
- Omit --session-id only when this task should follow the current caller Session.
- `--post-to channel` changes where the message is posted, not which session is continued.
- Use --create-session with --same-scope to create a reusable sibling Session in the current Workbench project or IM scope.
Use --create-session with --scope-id <scopes.id> to create a reusable Session in a specific existing scope.
+ Use --create-session with --same-scope only from an Avibe Agent shell, where the caller Session scope is available.
+ Use --cwd only for Sessions created by this task; existing target Sessions keep their own cwd.
`--message` and `--message-file` provide the stored user message that will be sent each time the task runs.
Use --cron for recurring jobs and --at for one-shot jobs.
Cron weekday digits use APScheduler semantics: 0=Mon through 6=Sun; 7 is invalid. Prefer weekday names such as mon, tue, or sun when scheduling by day of week.
@@ -290,8 +289,8 @@ def _task_add_examples_text() -> str:
Examples:
vibe task add --session-id sesk8m4q2p7x --cron '0 * * * *' --message 'Share the hourly summary.'
- vibe task add --session-id sesk8m4q2p7x --post-to channel --cron '*/5 * * * *' --message 'Tell a new joke each time.'
- vibe task add --create-session --same-scope --cron '0 9 * * *' --message 'Post a visible daily summary in this scope.'
+ vibe task add --create-session --scope-id slack::channel::C123 --cron '*/5 * * * *' --message 'Tell a new joke each time.'
+ vibe task add --create-session --scope-id slack::channel::C123 --cron '0 9 * * *' --message 'Post a visible daily summary in this scope.'
"""
)
@@ -305,8 +304,8 @@ def _task_update_examples_text() -> str:
vibe task update 12ab34cd56ef --name 'Morning summary'
vibe task update 12ab34cd56ef --cron '*/30 * * * *'
vibe task update 12ab34cd56ef --message 'Send a shorter summary.'
- vibe task update 12ab34cd56ef --session-id sesk8m4q2p7x --post-to channel
- vibe task update 12ab34cd56ef --create-session --same-scope
+ vibe task update 12ab34cd56ef --session-id sesk8m4q2p7x
+ vibe task update 12ab34cd56ef --create-session --scope-id slack::channel::C123
vibe task update 12ab34cd56ef --reset-delivery
Guidance:
@@ -336,13 +335,12 @@ def _hook_send_examples_text() -> str:
`--session-id` chooses which Agent Session Avibe will continue using for that one async turn.
Keep the current session id when the hook should continue in the same session.
If no session id is available, trigger this from an active Avibe conversation instead of guessing.
- `--post-to channel` changes where the message is posted, not which session is continued.
For new async one-shot work, prefer `vibe agent run --async`.
`--message` and `--message-file` provide the one-shot async user message that will be queued immediately.
Examples:
vibe agent run --async --session-id sesk8m4q2p7x --no-callback --message 'The export finished. Share the summary.'
- vibe agent run --async --session-id sesk8m4q2p7x --callback-session-id sescaller123 --message 'Share the benchmark result.'
+ vibe agent run --async --session-id sesk8m4q2p7x --no-callback --message 'Run the benchmark; I will inspect the run later.'
"""
)
@@ -351,9 +349,9 @@ def _watch_examples_text() -> str:
return dedent(
"""\
Examples:
- vibe watch add --session-id sesk8m4q2p7x --name 'Wait for export' --shell 'python3 scripts/wait_for_export.py'
- vibe watch add --session-id sesk8m4q2p7x --post-to channel --prefix 'The CI job finished.' -- python3 scripts/wait_for_ci.py --build 42
- vibe watch add --session-id sesk8m4q2p7x --forever --retry-exit-code 75 --retry-delay 60 --shell 'bash scripts/wait_for_log_pattern.sh'
+ vibe watch add --session-id sesk8m4q2p7x --name 'Wait for export' --message 'The export finished. Inspect it and continue.' --shell 'python3 scripts/wait_for_export.py'
+ vibe watch add --create-session --scope-id slack::channel::C123 --message 'The CI job finished. Inspect the result.' -- python3 scripts/wait_for_ci.py --build 42
+ vibe watch add --session-id sesk8m4q2p7x --forever --retry-exit-code 75 --retry-delay 60 --message 'The log pattern appeared. Continue from the result below.' --shell 'bash scripts/wait_for_log_pattern.sh'
vibe watch list --brief
vibe watch show 12ab34cd56ef
vibe watch pause 12ab34cd56ef
@@ -531,10 +529,10 @@ def _show_path_examples_text() -> str:
src/styles.css, index.html, and a sample api/health.ts handler.
First-run workflow:
- 1. Run: vibe show path
+ 1. Run: vibe show path --session-id sesk8m4q2p7x
2. Write or update src/App.tsx in the returned path.
3. Share the active URL if the command output includes one.
- 4. Run `vibe show update --visibility public` only when the user asks for a shareable public link.
+ 4. Run `vibe show update --session-id sesk8m4q2p7x --visibility public` only when the user asks for a shareable public link.
"""
)
@@ -612,26 +610,24 @@ def _watch_add_examples_text() -> str:
"""\
Session target:
Use --session-id with the target Agent Session ID, for example sesk8m4q2p7x.
- Inside an Avibe Agent shell, omit --session-id to default to the caller Session from AVIBE_SESSION_ID.
+ Inside an Avibe Agent shell, watches follow up in this conversation by default.
Guidance:
If this is your first time using this command, read this whole help entry before creating a watch.
Use a watch when a script should wait in the background and send a follow-up when it detects an event or reaches a terminal failure.
`--session-id` chooses which Agent Session Avibe will continue using for follow-up messages from the watch.
- Omit --session-id only when this watch should follow up in the current caller Session.
- `--post-to channel` changes where the follow-up is posted, not which session is continued.
- Use --create-session with --same-scope to create a reusable sibling Session in the current Workbench project or IM scope.
Use --create-session with --scope-id <scopes.id> to create a reusable Session in a specific existing scope.
- `--prefix` becomes the instruction text of the follow-up hook. On a successful cycle, Avibe prepends `--prefix` before waiter stdout and joins them with a blank line when both exist.
+ Use --create-session with --same-scope only from an Avibe Agent shell, where the caller Session scope is available.
+ Prefer --message or --message-file for follow-up instructions; --prefix is legacy-compatible.
Terminal failures also send a follow-up and disable the watch.
In forever mode, failures are retried only when the waiter exits with an allowed `--retry-exit-code`.
Pass either --shell '<command>' or a command after '--'.
--timeout applies to each cycle. --lifetime-timeout applies only to the whole forever watch lifetime.
Examples:
- vibe watch add --session-id sesk8m4q2p7x --shell 'python3 scripts/wait_for_export.py'
- vibe watch add --session-id sesk8m4q2p7x --post-to channel --prefix 'The export finished.' -- bash -lc 'sleep 120; echo done'
- vibe watch add --session-id sesk8m4q2p7x --forever --timeout 600 --lifetime-timeout 86400 --retry-exit-code 75 --retry-delay 30 -- uv run --no-project scripts/wait_pr.py --repo avibe-bot/avibe --pr 153
+ vibe watch add --session-id sesk8m4q2p7x --message 'The export finished. Inspect it and continue.' --shell 'python3 scripts/wait_for_export.py'
+ vibe watch add --create-session --scope-id slack::channel::C123 --message 'The export finished.' -- bash -lc 'sleep 120; echo done'
+ vibe watch add --session-id sesk8m4q2p7x --forever --timeout 600 --lifetime-timeout 86400 --retry-exit-code 75 --retry-delay 30 --message 'PR #153 changed. Inspect it and continue.' -- uv run --no-project scripts/wait_pr.py --repo avibe-bot/avibe --pr 153
"""
)
@@ -644,18 +640,26 @@ def _agent_run_examples_text() -> str:
Omit --session-id/--fork-self/--fork-session to create a private background Session for --agent.
Use --same-scope to place a new Session in the caller/source Session's scope.
Use --scope-id <scopes.id> to place a new Session in a specific existing scope.
+ --cwd only applies to new Sessions; existing Sessions keep their own cwd.
+
+ Callback:
+ From an Avibe Agent shell, async runs return their final result to this conversation by default.
+ From a normal terminal, pass --callback-session-id or --no-callback for async runs.
+ Pass --no-callback only when you intentionally want no automatic follow-up.
+ Pass --callback-session-id only when the final result should return somewhere else.
Forking:
- --fork-self forks the current caller Session from AVIBE_SESSION_ID.
+ --fork-self forks this current Session.
--fork-session <session-id> creates a new Avibe Agent Session and asks the native backend to fork the source native session on the first turn.
Forks keep the same backend, scope, and cwd as the source Session. Passing --agent is allowed only when that Agent uses the same backend.
--agent, --model, and --reasoning-effort may override the forked Session's Agent/model/effort.
- Do not combine fork flags with --session-id, --create-session, or --create-session-per-run.
+ Do not combine fork flags with --session-id or --create-session.
Examples:
vibe agent run --agent release-reviewer --message 'Review the latest deployment result.'
vibe agent run --agent release-reviewer --same-scope --message 'Review this project in a visible sibling Session.'
- vibe agent run --async --session-id sesk8m4q2p7x --no-callback --message 'The export finished. Share the summary.'
+ vibe agent run --async --agent release-reviewer --callback-session-id sescaller456 --message 'Review the latest CI result and report back.'
+ vibe agent run --async --agent release-reviewer --no-callback --message 'Run a background experiment; I will inspect the run later.'
vibe agent run --async --fork-self --message 'Explore this alternate fix from the current context.'
vibe agent run --fork-session sesk8m4q2p7x --agent reviewer --model gpt-5.4 --reasoning-effort high --message 'Review the forked context.'
"""
@@ -1253,7 +1257,7 @@ def _validate_session_id_target(
raise TaskCliError(
str(exc),
code="invalid_session_id",
- hint="Use the current Agent Session ID from the prompt, such as sesk8m4q2p7x.",
+ hint="Use a valid Agent Session ID. Inside an Avibe Agent shell, commands that continue this conversation can use the default target.",
example="sesk8m4q2p7x",
help_command=help_command,
details={"session_id": session_id},
@@ -1296,7 +1300,7 @@ def _resolve_session_target_args(
raise TaskCliError(
"one of --session-id or --session-key is required",
code="missing_session_target",
- hint="Use --session-id with the current Agent Session ID.",
+ hint="Run from an Avibe Agent shell to continue this conversation by default, or pass --session-id for the target Session.",
example="vibe task add --session-id sesk8m4q2p7x --cron '0 * * * *' --message 'Share the hourly summary.'",
help_command=help_command,
)
@@ -1327,7 +1331,7 @@ def _apply_caller_session_default(args, caller_context, *, purpose: str) -> Opti
setattr(args, "session_id", default_session_id)
return {
"code": "session_defaulted_to_caller",
- "message": f"{purpose} defaulted to the caller Session from AVIBE_SESSION_ID.",
+ "message": f"{purpose} defaulted to this Agent Session.",
"session_id": default_session_id,
}
@@ -1340,7 +1344,7 @@ def _resolve_show_session_id(args, *, help_command: str) -> tuple[str, Optional[
raise TaskCliError(
"Show Page session id is required outside an Avibe Agent environment.",
code="missing_session_target",
- hint="Pass --session-id, or run this command from an Avibe Agent shell where AVIBE_SESSION_ID is injected.",
+ hint="Run this command from an Avibe Agent shell, or pass --session-id for the target Show Page.",
help_command=help_command,
)
return session_id, notice
@@ -1354,7 +1358,7 @@ def _resolve_caller_session_id(args, *, purpose: str, help_command: str) -> tupl
raise TaskCliError(
f"{purpose} id is required outside an Avibe Agent environment.",
code="missing_session_target",
- hint="Pass the session id explicitly, or run this command from an Avibe Agent shell where AVIBE_SESSION_ID is injected.",
+ hint="Run this command from an Avibe Agent shell, or pass the target Session ID positionally.",
help_command=help_command,
)
return session_id, notice
@@ -1367,7 +1371,7 @@ def _require_caller_session_id(caller_context, *, purpose: str, help_command: st
raise TaskCliError(
f"{purpose} requires an Avibe Agent caller Session.",
code="missing_caller_session",
- hint="Run this command from an Avibe Agent shell where AVIBE_SESSION_ID is injected, or pass an explicit Session ID.",
+ hint="Run this command from an Avibe Agent shell, or pass an explicit Session ID.",
help_command=help_command,
)
@@ -1511,7 +1515,7 @@ def _resolve_definition_scope_key(args, *, caller_context, help_command: str) ->
)
if legacy_deliver_key and (raw_scope_id or same_scope):
raise TaskCliError(
- "use either legacy --deliver-key or the new scope placement flags, not both",
+ "use either the legacy delivery target or the new scope placement flags, not both",
code="conflicting_scope_target",
hint="Use --scope-id or --same-scope for new Agent-facing commands.",
help_command=help_command,
@@ -1597,9 +1601,9 @@ def _validate_delivery_args(
):
if post_to and deliver_key:
raise TaskCliError(
- "use either --post-to or --deliver-key, not both",
+ "use only one delivery override",
code="conflicting_delivery_target",
- hint="Use --post-to for the common thread/channel delivery choice, or --deliver-key for an explicit delivery target.",
+ hint="Prefer --scope-id or --same-scope for new Agent-facing commands.",
help_command=help_command,
)
@@ -1612,7 +1616,7 @@ def _validate_delivery_args(
delivery_target = _parse_validated_session_key(deliver_key, help_command=help_command)
if delivery_target.platform != session_target.platform:
raise TaskCliError(
- "--deliver-key must use the same platform as the session target",
+ "legacy delivery target must use the same platform as the session target",
code="invalid_delivery_target",
hint="Keep session memory and delivery on the same IM platform. Change only the channel, user, or thread target.",
help_command=help_command,
@@ -1623,9 +1627,9 @@ def _validate_delivery_args(
)
elif post_to == "thread" and not session_target.thread_id:
raise TaskCliError(
- "--post-to thread requires a thread-bound session target or an explicit --deliver-key",
+ "thread delivery override requires a thread-bound session target or explicit delivery target",
code="invalid_delivery_target",
- hint="Use a thread-bound Agent Session ID or --deliver-key with a thread target.",
+ hint="Use a thread-bound Agent Session ID, or keep delivery following the Session target.",
help_command=help_command,
details={"session_id": session_id, "session_key": session_key, "post_to": post_to},
)
@@ -1644,7 +1648,7 @@ def _validate_delivery_override_for_target(
delivery_target = _parse_validated_session_key(deliver_key, help_command=help_command)
if delivery_target.platform != session_target.platform:
raise TaskCliError(
- "--deliver-key must use the same platform as the session target",
+ "legacy delivery target must use the same platform as the session target",
code="invalid_delivery_target",
hint="Keep session memory and delivery on the same IM platform. Change only the channel, user, or thread target.",
help_command=help_command,
@@ -1655,7 +1659,7 @@ def _validate_delivery_override_for_target(
)
elif post_to == "thread" and not session_target.thread_id:
raise TaskCliError(
- "--post-to thread requires a thread-bound session target",
+ "thread delivery override requires a thread-bound session target",
code="invalid_delivery_target",
hint="Use a thread-bound Agent Session ID, or keep delivery following the created Session target.",
help_command=help_command,
@@ -2254,7 +2258,7 @@ def cmd_task_update(args):
raise TaskCliError(
"use either --reset-delivery or a new delivery flag, not both",
code="conflicting_delivery_target",
- hint="Pass --reset-delivery to clear delivery overrides, or pass --post-to/--scope-id/--same-scope to replace them.",
+ hint="Pass --reset-delivery to clear delivery overrides, or pass --scope-id/--same-scope to replace placement.",
help_command="vibe task update --help",
)
caller_context = caller_context_from_env()
@@ -3048,7 +3052,7 @@ def _validate_run_session_policy(args, *, help_command: str) -> str:
)
if deliver_key and (same_scope or scope_id):
raise TaskCliError(
- "use either legacy --deliver-key or the new scope placement flags, not both",
+ "use either the legacy delivery target or the new scope placement flags, not both",
code="conflicting_scope_placement",
hint="Use --scope-id or --same-scope for new Agent-facing commands.",
help_command=help_command,
@@ -3175,7 +3179,7 @@ def _validate_definition_session_policy(
code="missing_session_policy",
hint=(
"Use --session-id to continue a Session, or --create-session with --same-scope/--scope-id to create one. "
- "Inside an Avibe Agent shell, Avibe can default this to the caller Session from AVIBE_SESSION_ID."
+ "Inside an Avibe Agent shell, this can continue the current conversation by default."
),
help_command=help_command,
)
@@ -3429,9 +3433,9 @@ def _resolve_callback_session_id(args, caller_context, *, target_session_id: Opt
return caller_context.session_id, {
"code": "callback_defaulted_to_caller_session",
"message": (
- "Async callback defaulted to the caller Session from AVIBE_SESSION_ID."
+ "Async callback defaulted to this conversation."
if is_async
- else "Callback route defaulted to the caller Session from AVIBE_SESSION_ID."
+ else "Callback route defaulted to this conversation."
),
"callback_session_id": caller_session_id,
}
@@ -3444,8 +3448,7 @@ def _resolve_callback_session_id(args, caller_context, *, target_session_id: Opt
"Pass --callback-session-id <session-id> to send the final result back to a specific Agent Session, "
"or pass --no-callback to run without an automatic follow-up and inspect the result later with "
"`vibe runs show <run-id>` or by polling/listing runs for the target Session. "
- "`--callback-session-id` identifies the Session that should receive the delegated run's final result; "
- "when Avibe can resolve the caller context, this defaults to the current caller Session."
+ "`--callback-session-id` identifies the Session that should receive the delegated run's final result."
),
help_command="vibe agent run --help",
)
@@ -3618,7 +3621,7 @@ def cmd_agent_run(args):
raise TaskCliError(
"delivery options require an explicit Session target",
code="delivery_target_without_session_policy",
- hint="Use --same-scope or --scope-id for new Session placement. Use --post-to only with an existing target.",
+ hint="Use --same-scope or --scope-id for new Session placement.",
help_command="vibe agent run --help",
)
if session_policy == "fork" and args.post_to:
@@ -5959,7 +5962,7 @@ def cmd_watch_add(args):
message = _resolve_optional_message_input(
args,
help_command="vibe watch add --help",
- example_command="vibe watch add --session-id sesk8m4q2p7x",
+ example_command="vibe watch add --session-id sesk8m4q2p7x --message 'Continue when the waiter finishes.'",
legacy_prefix=prefix,
)
@@ -6080,7 +6083,7 @@ def cmd_watch_update(args):
raise TaskCliError(
"use either --reset-delivery or a new delivery flag, not both",
code="conflicting_delivery_target",
- hint="Pass --reset-delivery to clear delivery overrides, or pass --post-to/--scope-id/--same-scope to replace them.",
+ hint="Pass --reset-delivery to clear delivery overrides, or pass --scope-id/--same-scope to replace placement.",
help_command="vibe watch update --help",
)
caller_context = caller_context_from_env()
@@ -8657,9 +8660,9 @@ def build_parser():
agent_run_parser.add_argument("--agent", help="Avibe Agent name")
agent_run_parser.add_argument("--session-id", help="Existing Agent Session ID to continue")
agent_run_parser.add_argument("--fork-session", help="Existing Agent Session ID to fork into a new Session")
- agent_run_parser.add_argument("--fork-self", action="store_true", help="Fork the current caller Session from AVIBE_SESSION_ID")
+ agent_run_parser.add_argument("--fork-self", action="store_true", help="Fork this current Agent Session")
agent_run_parser.add_argument("--create-session", action="store_true", help="Create a new Avibe Session ID before running")
- agent_run_parser.add_argument("--create-session-per-run", action="store_true", help="Create a new Avibe Session ID for each definition run")
+ agent_run_parser.add_argument("--create-session-per-run", action="store_true", help=argparse.SUPPRESS)
agent_run_parser.add_argument("--same-scope", action="store_true", help="Place a new or forked Session in the caller/source Session scope")
agent_run_parser.add_argument("--scope-id", help="Existing scopes.id that should own the new or forked Session")
agent_run_parser.add_argument("--deliver-key", help=argparse.SUPPRESS)
@@ -8672,7 +8675,7 @@ def build_parser():
"invoked from. Invalid with --session-id (an existing session keeps its own working directory)."
),
)
- agent_run_parser.add_argument("--post-to", choices=("thread", "channel"))
+ agent_run_parser.add_argument("--post-to", choices=("thread", "channel"), help=argparse.SUPPRESS)
agent_run_parser.add_argument("--callback-session-id", help="Caller Session ID to receive the completed async run result")
agent_run_parser.add_argument(
"--no-callback",
@@ -8703,7 +8706,7 @@ def build_parser():
runs_list_parser.add_argument("--agent", help="Filter by Avibe Agent name")
runs_list_parser.add_argument("--backend", choices=("codex", "claude", "opencode"), help="Filter by backend")
runs_list_parser.add_argument("--session-id", help="Filter by Agent Session ID")
- runs_list_parser.add_argument("--current-session", action="store_true", help="Filter to the caller Session from AVIBE_SESSION_ID")
+ runs_list_parser.add_argument("--current-session", action="store_true", help="Filter to this current Agent Session")
runs_list_parser.add_argument("--definition-id", help="Filter by task or watch definition ID")
runs_list_parser.add_argument("--created-after", help="Filter by created_at >= timestamp, or relative value such as 6h or 7d")
runs_list_parser.add_argument("--created-before", help="Filter by created_at <= timestamp, or relative value such as 6h or 7d")
@@ -9216,7 +9219,7 @@ def build_parser():
delivery_group.add_argument(
"--post-to",
choices=("thread", "channel"),
- help="Delivery location override. This changes where the message is posted, not which session is continued.",
+ help=argparse.SUPPRESS,
)
delivery_group.add_argument(
"--deliver-key",
@@ -9262,7 +9265,7 @@ def build_parser():
update_delivery_group.add_argument(
"--post-to",
choices=("thread", "channel"),
- help="Replace the delivery location override",
+ help=argparse.SUPPRESS,
)
update_delivery_group.add_argument(
"--deliver-key",
@@ -9392,7 +9395,7 @@ def build_parser():
hook_delivery_group.add_argument(
"--post-to",
choices=("thread", "channel"),
- help="Delivery location override. This changes where the message is posted, not which session is continued.",
+ help=argparse.SUPPRESS,
)
hook_delivery_group.add_argument(
"--deliver-key",
@@ -9447,7 +9450,7 @@ def build_parser():
watch_delivery_group.add_argument(
"--post-to",
choices=("thread", "channel"),
- help="Delivery location override. This changes where the follow-up is posted, not which session is continued.",
+ help=argparse.SUPPRESS,
)
watch_delivery_group.add_argument(
"--deliver-key",
@@ -9535,7 +9538,7 @@ def build_parser():
watch_update_delivery_group.add_argument(
"--post-to",
choices=("thread", "channel"),
- help="Delivery location override. This changes where the follow-up is posted, not which session is continued.",
+ help=argparse.SUPPRESS,
)
watch_update_delivery_group.add_argument(
"--deliver-key",