Skip to main content

Shortcut Instructions

Version note: the unified command, target, reference, and approval-reply protocol is available starting with v0.0.4.beta.

Shortcut instructions perform explicit session operations. They are not ordinary tasks sent to the Agent and do not require the model to infer the user's intent.

How to Use Them

Enter / in the Agent Session composer. The page shows commands available for the current session. Select a command and send it.

Commands should normally be sent by themselves without ordinary task text after them. For example:

/compress

If a command does not apply to the selected session, or the session is running or waiting for confirmation, the page explains why it cannot run.

Available Commands

CommandWhere it worksEffect
/refresh_messagesMain and sub-sessionsSynchronizes the current page's session messages again
/deleteSub-sessions onlyDeletes the current sub-session and removes it from the session list
/clear-historyMain session onlyClears the currently visible main-session history and continues from a new context boundary
/compressMain and sub-sessionsManually compresses the current session context

The page only suggests commands that apply to the selected session. A main session does not show /delete, and a sub-session does not show /clear-history.

Refresh Messages

/refresh_messages

Use this when messages appear incomplete, the page has not updated, or you want to refresh the session after reconnecting.

It only synchronizes the page again. It does not rerun the task or delete server records.

Delete a Sub-session

/delete

This command only works for a sub-session. It removes the sub-session from the active session list and cannot delete the main session.

Before deleting it, confirm that important results have been returned to the main session or saved in the appropriate location.

Clear Main-session History

/clear-history

This command only works for the main session. It moves earlier messages outside the currently visible history and lets later work continue from a new context boundary.

Important boundaries:

  • This is not secure erasure and does not mean the underlying history was physically deleted.
  • Workspace files, Skills, Tools, secret configuration, and user memory are not deleted.
  • Save important conclusions as files or restate them in the next task before clearing history.

/clear_history and /clear history are accepted as aliases. The interface shows /clear-history as the standard form.

Manually Compress Context

/compress

Use this when a session has become long and you want to reduce context usage while preserving the current task's main line.

Compression keeps the current goal, progress, constraints, working facts, and important artifact references. It does not delete workspace files and is different from clearing history. Compression may take some time and uses model capacity.

If there is not enough context to compress, the page reports that directly. Handle a running task or pending approval before starting manual compression.

Targets, Object References, and Approval Replies

xAgent uses different prefixes for routing and object references:

@{session:session-id} Continue this task
Analyze #{file:file-id}
@{approval:approval-id} approve
  • @{session:session-id} targets the following message or command at a specific session.
  • #{type:id} only references an object in the current message. It does not reroute or execute an action.
  • @{approval:approval-id} approve/reject submits a control reply to a specific approval.
  • #{approval:approval-id} only references an approval record and cannot decide it.

Prefer text generated by the interface, Connector notification, or suggestion menu instead of guessing object IDs manually. See the Shortcut Instruction Protocol for complete semantics, combinations, and security boundaries.

Notes

  • An unknown /command returns an error instead of becoming an ordinary Agent task.
  • Do not append ordinary task instructions after a command.
  • Some commands are unavailable while a session is running or waiting for confirmation.
  • /clear-history is not a data-destruction feature.
  • A directed target must appear at the beginning. @{session:id} in the middle of ordinary text does not reroute the message.
  • Object references do not bypass file boundaries, approval policy, or other permission checks.

Continue Reading