Skip to content
AI Primer
workflow

Codex supports agent-written `/goal` prompts for spawned threads

Codex users are having the agent write its own `/goal` and sub-agent goals, with OpenAI-side commentary describing that as a built-in meta-prompting pattern. The workflow turns long autonomous runs into a tighter control loop, but users still review goals first so a bad objective does not burn tokens for hours.

4 min read
Codex supports agent-written `/goal` prompts for spawned threads
Codex supports agent-written `/goal` prompts for spawned threads

TL;DR

  • OpenAI's own docs position /goal as a persistent objective that can keep Codex working for multiple hours, while skirano's demo shows a newer pattern where Codex writes that goal for itself and for each spawned agent.
  • thsottiaux's explanation describes agent-visible /goal as a generalization of meta prompting, and the official subagents docs confirm that Codex can spawn parallel agents and route follow-up instructions across their threads.
  • The mobile side of this matters because reach_vb's guide treats the phone as a control plane for the host machine, and OpenAI's mobile announcement plus release notes say iOS now supports worktrees, environment setup, inline review comments, and /goal management.
  • Users are also converging on the same caveat: according to omarsar0's reply, a weak self-written goal can quietly waste tokens, while onusoz's GEPA note says long solver loops still need explicit iteration bounds.

You can read OpenAI's goal-mode guide, check the official slash-command docs for /side, and browse the mobile rollout post. The weirdly useful bit is that reach_vb's workflow list and skirano's subagent demo are describing the same shift from two ends: the phone is becoming the steering surface, and /goal is becoming something the agent can author for itself.

Mobile control plane

OpenAI's mobile announcement frames Codex on phone as a way to answer questions, review findings, change direction, and approve what comes next while the real work runs on a laptop, devbox, or remote environment. reach_vb's guide makes that more concrete.

The workflow list in reach_vb's post lines up closely with OpenAI's Jun. 9 release notes, which added branch selection, worktree creation, environment setup scripts, inline review comments, and /goal support in ChatGPT for iOS.

The useful commands break down like this:

  • /side: an ephemeral fork for a focused follow-up, per the official slash-command docs
  • /plan: shape a multi-step implementation path before committing to execution, per the Codex manual
  • /goal: set or manage a durable objective from mobile, per the goal-mode guide

Agent-written goals

The striking change in skirano's demo is not just that Codex can run a /goal, it is that the user no longer writes the goal text by hand. In a follow-up reply, skirano reduces the setup to a single request.

According to thsottiaux's explanation, Codex can see and set its own /goal, because OpenAI exposes new capabilities to the agent as tools for the agent too. That is a clean extension of what the official goal-mode docs already say: the goal text acts as both starting prompt and completion criteria.

The subagent piece is also real, not just a demo flourish. OpenAI's subagents docs say Codex can spawn specialized agents in parallel, route follow-up instructions, wait for results, and close agent threads, which is exactly the shape skirano's video is leaning on when it generates a main goal and per-agent goals.

Goal graders and token burn

Once the agent can draft its own objective, the new bottleneck is goal quality. omarsar0's longer reply argues that the agent often has the best context to write a strong goal, but his later reply says he now reviews that goal and runs it through a goal grader so a bad objective does not just burn tokens for hours.

That caution matches both the official Goals cookbook, which describes a goal as a user-controlled completion contract, and the rougher field report in onusoz's GEPA thread, where a long /goal loop stopped after one iteration and pushed the user toward explicit min_iter and max_iter bounds.

One thing the official docs say plainly, and the social posts mostly imply, is that long runs still need a validation loop. The goal-mode guide recommends goals with a clear target and a checkable definition of done, which helps explain why users are adding graders, verifiers, and iteration caps around the self-authored-goal pattern.

Reboot resume

A smaller but revealing detail came from sound4movement's post: after a Mac mini powered off overnight, the Codex app relaunched at login and resumed the long-running /goal. That makes the workflow feel less like a chat session and more like a background job with a UI attached.

That report also fits the mobile-control-plane framing in OpenAI's remote-connections docs, which describe using the ChatGPT mobile app to control a connected Mac or Windows host. sound4movement's example adds the missing operational detail that at least one goal run survived an interrupted machine and continued once the host came back.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 2 threads
Agent-written goals1 post
Goal graders and token burn1 post
Share on X