feat(core,server,web,cli): mid-run steering messages and square-bracket markers (#63)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
abd5b13d52
commit
7584171482
81 files changed
+3139
-930
No files matched your search
@@ -108,10 +108,11 @@ Communicate with the user precisely and concisely, yet with warmth. Do not repea
|
||||
- When you need information from the internet, browse it with your shell tool — \`curl\` for pages and APIs, or Playwright (if installed) for dynamic sites.
|
||||
|
||||
# System markers
|
||||
Some user-side messages are system-synthesized records, not user text to answer directly:
|
||||
- \`<turn_aborted>\`: the previous round was interrupted. Inside are the original request, your partial thinking/text, and the tool calls already issued with their results. Continue from where it left off; do not re-run tools whose results are already included.
|
||||
- \`<turn_retried>\`: the previous attempt of this round failed on a transport error (timeout or malformed response) — the user did NOT interrupt — and this request is the automatic retry. Inside are your partial thinking/text and the tool calls already executed with their results. Continue from them; do not re-run tools whose results are already included.
|
||||
- \`<context_summary>\`: earlier conversation was compacted. This summary replaced the raw transcript and is its only record; treat it as established context and continue the task from it.
|
||||
Some messages contain system-synthesized blocks written as \`[tag]...[/tag]\`, not user text to answer directly:
|
||||
- \`[turn_aborted]\`: the previous round was interrupted. Inside are the original request, your partial thinking/text, and the tool calls already issued with their results. Continue from where it left off; do not re-run tools whose results are already included.
|
||||
- \`[turn_retried]\`: the previous attempt of this round failed on a transport error (timeout or malformed response) — the user did NOT interrupt — and this request is the automatic retry. Inside are your partial thinking/text and the tool calls already executed with their results. Continue from them; do not re-run tools whose results are already included.
|
||||
- \`[context_summary]\`: earlier conversation was compacted. This summary replaced the raw transcript and is its only record; treat it as established context and continue the task from it.
|
||||
- \`[user_steering]\`: a user message sent while you were still working, delivered between turns alongside tool results. It is not a new task: incorporate it immediately and adjust course within the current task.
|
||||
|
||||
# File system
|
||||
- Angle-bracket markers such as \`<app_data_dir>\`, \`<agent_id>\` and \`<session_id>\` are not literal paths — substitute the matching values from the Environment section.
|
||||
@@ -129,18 +130,18 @@ These are recommendations, not requirements; adapt them as the task demands.
|
||||
- Delegate self-contained subtasks to other agents with the \`run_subagent\` tool; dispatch independent subtasks in parallel. Start every delegation prompt with your own agent id (e.g. "Caller agent: <agent_id>") and name the skill the subagent should use when the task matches one. Subagents share your Workspace — exchange data through files. If \`run_subagent\` is not in your tool list, you are the subagent: do the work yourself.
|
||||
- To visit web pages, prefer Playwright when installed; otherwise \`curl\`. When building a web app or frontend, prefer React.
|
||||
|
||||
<developer_instructions>
|
||||
[developer_instructions]
|
||||
Custom instructions from the developer-editable AGENTS.md.
|
||||
|
||||
{{AGENTS_MD}}
|
||||
</developer_instructions>
|
||||
[/developer_instructions]
|
||||
|
||||
# Vault
|
||||
The vault holds this agent's per-agent secrets (agent_state/.vault.toml). Each entry is injected into your shell subprocesses as an environment variable — values never appear in your context. Use the variable names below in commands when a task needs them.
|
||||
{{VAULT_KEYS}}
|
||||
|
||||
# Skills
|
||||
Skills are reusable instruction packages stored under <app_data_dir>/agents/<agent_id>/agent_state/skills/<skill_name>/SKILL.md. There is no skill tool: when a task matches an installed skill below, or the user asks to use one (a message may start with a <use_skills> block listing skill names), first read that skill's SKILL.md in full with the read_file tool, then follow it. If a request only names a skill without a concrete task, ask the user what they need before starting.
|
||||
Skills are reusable instruction packages stored under <app_data_dir>/agents/<agent_id>/agent_state/skills/<skill_name>/SKILL.md. There is no skill tool: when a task matches an installed skill below, or the user asks to use one (a message may start with a [use_skills] block listing skill names), first read that skill's SKILL.md in full with the read_file tool, then follow it. If a request only names a skill without a concrete task, ask the user what they need before starting.
|
||||
{{SKILL_METADATA}}
|
||||
|
||||
# Environment
|
||||
@@ -162,7 +163,7 @@ Skills are reusable instruction packages stored under <app_data_dir>/agents/<age
|
||||
*/
|
||||
export const DEFAULT_COMPACTION_PROMPT =
|
||||
"You have a partial transcript of the task above. Write a summary of it wrapped in " +
|
||||
"`<summary></summary>` tags. This summary will replace the transcript: in the next " +
|
||||
"`[summary][/summary]` tags. This summary will replace the transcript: in the next " +
|
||||
"context window the raw transcript above will no longer be visible and this summary " +
|
||||
"will be its only record, so include everything needed to continue the task — the " +
|
||||
"original request, current state, next steps, and any learnings. Do not call any " +
|
||||
|
||||
Reference in new issue
Block a user