Feature: My Agent Tasks - EyevinnOSC/community GitHub Wiki
My Agent Tasks
My Agent Tasks is a feature in the OSC web console that lets you create and schedule automated Claude Code tasks that run on your behalf. Instead of having your own machine running Claude Code on a schedule, OSC handles the execution for you in the cloud.
What You Can Do
- Create tasks with a natural language prompt that Claude Code will execute
- Schedule tasks to run automatically (every 15 minutes, hourly, daily, weekdays, weekly)
- Optionally point tasks at a Git repository so the agent has access to your code
- Trigger tasks manually at any time with "Run Now"
- Manage tasks via the web console or MCP tools
Prerequisites
- An OSC account on a paid plan (Personal, Professional, or Business)
- An Anthropic API key or Claude OAuth token
Getting Started
Step 1: Navigate to My Agent Tasks
Go to My Agent Tasks in the OSC web console.
Step 2: Configure Credentials
The first time you open the page you are prompted to configure your agent credentials. Choose one of:
- Anthropic API Key — an
sk-ant-...key from console.anthropic.com - Claude OAuth Token — a token obtained via Claude's OAuth flow
Enter the credential and click Save. The credentials are stored securely and used to run your tasks.
Once credentials are configured, a status bar at the top of the page shows the credential type (Anthropic API Key or Claude OAuth Token). From there you can:
- Reconfigure — click to expand the setup form inline and enter new credentials
- Remove — opens a confirmation modal to delete stored credentials
Step 3: Create a Task
Click Create Task and fill in:
| Field | Description |
|---|---|
| Name | Short identifier for the task |
| Description | What the task does (optional, for your reference) |
| Prompt | The instruction Claude Code will execute |
| Source URL | Git repository URL to give the agent code context (optional) |
| Git Token | Personal access token for private repositories (optional, write-only) |
| OSC Access Token | Short-lived OSC API token for tasks that call OSC services (optional, write-only) |
| Schedule | When to run the task (choose a preset or enter a cron expression) |
Advanced Settings (click "Advanced Settings" to expand):
| Field | Description |
|---|---|
| Model | Claude model to use (default: claude-sonnet-4-5-20250514) |
| Max Turns | Maximum agent turns per run (default: 25) |
| Allowed Tools | Comma-separated tool allowlist (e.g., Read,Write,Edit) |
| Disallowed Tools | Comma-separated tool blocklist (e.g., Bash) |
| Sub Path | Subdirectory within the source repository to use as the working directory |
Schedule presets:
| Preset | Cron expression |
|---|---|
| Every 15 minutes | */15 * * * * |
| Hourly | 0 * * * * |
| Daily at 9am | 0 9 * * * |
| Weekdays at 9am | 0 9 * * 1-5 |
| Weekly Mon at 9am | 0 9 * * 1 |
Click Create to save the task.
Step 4: Run or Monitor Tasks
Tasks run automatically on their schedule. You can also:
- Click the Run Now button on any task to trigger it immediately
- Check the Last Run and Next Run timestamps in the task table
- Edit or delete a task from the actions column
Using MCP Tools
If you have an AI agent connected to OSC via MCP, you can manage agent tasks using natural language:
Set up my agent credentials using my Anthropic API key sk-ant-...
Create a daily task called "sync-report" that runs every weekday at 9am.
The prompt should be: Review the GitHub issues in my repo and post a summary to Slack.
Use https://github.com/myorg/myrepo as the source URL.
List my agent tasks and show me which ones ran today.
Run my "sync-report" task now.
Delete the agent task called "old-task".
Available MCP tools:
| Tool | Description |
|---|---|
setup-agent |
Store agent credentials (Anthropic API key or Claude OAuth token) |
create-agent-task |
Create a scheduled agent task |
list-agent-tasks |
List all tasks with schedule and last/next run timestamps |
run-agent-task |
Manually trigger an immediate task run |
delete-agent-task |
Permanently remove a task |
Prompt Tips
Write prompts as clear task descriptions. The agent runs Claude Code, so prompts that work well in Claude Code work well here:
- "Review open GitHub issues labeled 'bug' in myorg/myrepo and add a comment with a suggested fix approach."
- "Check the health of my OSC services and send a Slack message to #ops if any are unhealthy."
- "Fetch yesterday's analytics data from my Plausible instance and append a row to the Google Sheet at ..."
- "Generate a daily standup summary from my Jira board and post it to #team-standup."
For tasks that interact with code, set Source URL to the relevant repository so the agent can read and modify files in context.