Skip to main content

Long-Horizon Work and Subagents

Anda Bot is designed for complex goals that need continuity, not only one answer. Long-horizon work preserves the objective, checks progress, compacts context, and continues when needed.

Use /goal​

/goal marks a request as a long-horizon goal:

/goal Finish this release prep: run tests, check the changelog, verify install script docs, and summarize risk.

When the main agent is idle, the goal checker evaluates whether the current result is complete. If more work is needed, it can generate a follow-up for the main agent. If the work can only continue with your input, such as a decision, credentials, or an approval, the goal pauses and says what it needs; your next message resumes it. When context grows too long, Anda compacts the current state and opens a linked conversation to continue the same session.

Use /loop​

/loop runs a prompt or slash command repeatedly. Describe the interval in the request using whatever wording is natural, such as every 5 minutes, 5m, or localized time units. The model interprets the interval and can create a recurring agent cron job when needed:

/loop every 5 minutes /side Check whether the deploy queue is blocked and summarize the result.

If you do not describe an interval, Anda lets the model self-pace the loop and continue when more work is needed:

/loop Keep checking the migration until every validation step is proven complete.

Scheduled jobs​

Cron supports recurring cron expressions, every intervals, and one-off at/once jobs. The scheduler polls every five seconds and runs at most eight jobs at once. Agent runs wait for the submitted work to complete, including background tools; shell runs wait for the process to exit. every intervals start from completion, and missed recurring occurrences are not replayed individually. One-off timestamps are rounded up to the next second, so they never run before the requested time. Cron expressions use the standard five fields, where 0 or 7 is Sunday; six- and seven-field forms add seconds and a year and count weekdays from 1 = Sunday, so use day names such as MON-FRI there.

Editing a paused job keeps it paused; use manage_cron_job with resume to reactivate it. Resending the current schedule along with other edits keeps the next run time. A one-time job that already ran is reported as completed, not paused, and cannot be resumed; give it a new schedule to run it again. Setting origin=true in update_cron_job moves future runs to the current caller and conversation. An already running execution retains its original route. Job and run lists show bounded text previews; use manage_cron_job with get for the full job and its latest result. Removing a job retains its run history and does not cancel an execution already started.

Cron tools are restricted to trusted users. Jobs created from the owner's CLI validate and save the registered working directory, so that authorization survives restarts and temporary CLI registration expiry. For older CLI jobs without saved authorization, reconnect the CLI in the intended directory and update the job with origin=true once. Request metadata alone cannot authorize a new directory.

Use /side​

/side or /btw puts a request into an independent side task. It is useful for:

  • Researching a risk.
  • Asking another perspective to review the current conclusion.
  • Gathering background without interrupting the main conversation.
/side Check whether this dependency upgrade affects macOS arm64 users.

Use /skill​

Personal runtime skills live in ~/.anda/skills; bundled release skills load from ~/.anda/bundled-skills. When you want a specific workflow to handle a request:

/skill git-assistant Draft a Conventional Commit message from the current diff.

Most skills run inline: Anda reads the whole SKILL.md and follows it in the current conversation, so it can still see your chat history, ask you questions, and use the files you attached. A skill whose frontmatter declares execution: subagent runs as an isolated worker instead — right for long-running or unattended procedures such as codex, claude-code, and auto-research, and wrong for anything that needs to talk to you mid-task.

What Subagents Do​

Subagents can take specialized roles such as research, implementation, review, and supervision. The main session keeps the objective and final judgment; subagents handle focused work.

This structure is useful for:

  • Research that requires reading many files or references.
  • Code tasks where implementation and review should be separated.
  • Goals that need repeated checks of whether the work is actually done.
  • Work that needs external tools without losing the main thread.

Tools and Local Workspace​

Anda's base tools include memory, shell, file read/write, skills, cron, and subagents. File and shell tools work in ~/.anda/workspace by default.

When a task involves the current repository or external tools, state the objective, acceptance criteria, and boundaries clearly.

/goal Fix the docs build in the current repository. Do not edit Rust code. Done means pnpm --dir docsite build passes.

When Not to Use /goal or /loop​

Simple Q&A, one-off explanations, and short command lookups do not need /goal or /loop. Send a normal message. Save /goal for work that needs completion auditing, and /loop for recurring or self-paced follow-up.