Skip to content

Commit deac7e5

Browse files
committed
Add agent status command
1 parent 9f7a2ff commit deac7e5

7 files changed

Lines changed: 901 additions & 17 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ Inspect and talk to agents:
188188
```bash
189189
codexapi agent list
190190
codexapi agent show ci-fixer
191+
codexapi agent status ci-fixer
192+
codexapi agent status --actions ci-fixer
191193
codexapi agent read ci-fixer
192194
codexapi agent book ci-fixer
193195
codexapi agent send ci-fixer "Prefer the smallest safe fix."
@@ -202,6 +204,10 @@ codexapi agent cancel ci-fixer
202204
codexapi agent delete ci-fixer
203205
```
204206

207+
`codexapi agent resume` can reopen a `done` agent. Sending to a `done` or
208+
`canceled` agent still triggers a one-off wake on the next tick so you can get
209+
a reply without putting the agent back into continuous heartbeat mode.
210+
205211
Create a child agent explicitly:
206212

207213
```bash
@@ -222,6 +228,10 @@ wrappers report inconsistent hostnames for the same machine.
222228

223229
`codexapi agent show` also prints the resolved `AGENTBOOK.md` path so you can
224230
jump directly to the durable working memory file.
231+
`codexapi agent status` reads the latest turn from the agent's rollout log and
232+
shows recent commentary plus the final visible output. Pass `--actions` to
233+
include the tool-action summary. If a wake is still in progress, it shows the
234+
active turn so far.
225235

226236
See [docs/agent-v1.md](docs/agent-v1.md) for the filesystem model and scheduling
227237
details.

docs/agent-v1.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,10 @@ Processing rules:
547547
- commands are applied in timestamp order
548548
- `pause` and `cancel` are applied before starting a new backend wake
549549
- `send` contributes to the next prompt and increments unread counts until
550-
consumed
550+
consumed; `done` and `canceled` agents still process queued messages as a
551+
one-off wake
551552
- `wake` means run soon even if no heartbeat is due
552-
- `resume` only changes state when the agent is paused
553+
- `resume` reopens a `paused` or `done` agent
553554
- after successful application, the owner host records the result in state or a
554555
run record and deletes the claimed file
555556

@@ -644,6 +645,7 @@ V1 CLI surface:
644645
- `codexapi agent read`
645646
- `codexapi agent book`
646647
- `codexapi agent show`
648+
- `codexapi agent status`
647649
- `codexapi agent send`
648650
- `codexapi agent wake`
649651
- `codexapi agent pause`

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "codexapi"
7-
version = "0.10.1"
7+
version = "0.11.0"
88
description = "Minimal Python API for running the Codex CLI."
99
readme = "README.md"
1010
requires-python = ">=3.8"

src/codexapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
"task_result",
2828
"lead",
2929
]
30-
__version__ = "0.10.1"
30+
__version__ = "0.11.0"

0 commit comments

Comments
 (0)