Manual Codex flow workspace for jojo Actions smoke tests
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-18 18:06:40 +00:00
.codex Add manual thread session artifact 2026-05-18 18:06:40 +00:00
.forgejo/workflows Store Action thread sessions as repo artifacts 2026-05-18 15:05:06 +00:00
flows Store Action thread sessions as repo artifacts 2026-05-18 15:05:06 +00:00
scripts Remove thread bundle artifacts 2026-05-18 18:06:07 +00:00
.gitignore Remove thread bundle artifacts 2026-05-18 18:06:07 +00:00
bun.lock Remove thread bundle artifacts 2026-05-18 18:06:07 +00:00
package.json Remove thread bundle artifacts 2026-05-18 18:06:07 +00:00
README.md Store Action thread sessions as repo artifacts 2026-05-18 15:05:06 +00:00

auto-workspace

Small Codex flow workspace for getting comfortable with manually triggered jojo.build Actions.

What It Runs

  • .forgejo/workflows/manual-flow-smoke.yml exposes a workflow_dispatch workflow.
  • .forgejo/workflows/manual-agent-turn.yml exposes a workflow_dispatch workflow that starts one short Codex agent turn.
  • .codex/workspace.toml defines the actions-smoke workspace task.
  • .codex/workspace.toml also defines the agent-turn workspace task.
  • scripts/run-manual-smoke.ts creates a demo.actions.smoke FlowEvent and dispatches it through the local flow client with file-backed Actions state.
  • scripts/run-agent-turn.ts creates a demo.codex.agent_turn FlowEvent and dispatches it through the same file-backed Actions state.
  • flows/actions-smoke contains the Bun flow step and payload schema.
  • flows/codex-agent-turn contains a module-style Bun flow step that starts a Codex app-server turn through @peezy.tech/codex-flows/flows.

The smoke flow is intentionally safe: it writes only local Actions state under .codex/workspace/actions and emits a completed FLOW_RESULT. The agent-turn flow also requires an authenticated Codex CLI environment. In Actions, the workflow uses the repo's .codex directory as $CODEX_HOME and writes .codex/auth.json from one of these secrets: CODEX_AUTH_JSON_B64, CODEX_AUTH_JSON, or OPENAI_API_KEY.

For app-server based flows, prefer CODEX_AUTH_JSON_B64 or CODEX_AUTH_JSON because codex app-server reads $CODEX_HOME/auth.json. OPENAI_API_KEY is supported by writing the minimal auth.json file in the workflow. Runtime-only auth, SQLite, shell snapshots, temp files, and unrelated session files are removed before the job exits. The selected Codex rollout is kept as a native repo artifact under .codex/sessions/....

.codex/config.toml enables Codex memories for the action-scoped Codex home. The manual agent-turn workflow has a memory_text input. When set, the flow runs a two-turn memory smoke: one turn seeds the stable fact, the flow marks that seed thread old enough for Codex's startup memory extractor, and a second turn triggers the real memory pipeline. The flow waits for raw_memories.md, rollout_summaries/, MEMORY.md, and memory_summary.md under .codex/memories.

Successful agent-turn workflow runs commit their workspace state back to main. Run records and outputs are stored under .codex/workspace/actions, exported thread index JSON is stored under .codex/workspace/actions/threads, selected Codex rollout JSONL files are stored under .codex/sessions, and Codex memory files are stored under .codex/memories before the workspace state commit is created. After pulling the commit, resume an Action-created thread with:

CODEX_HOME="$PWD/.codex" codex -C "$PWD" resume <thread-id>

Local Smoke

bun install
bun run flow:list
bun run flow:fixture
bun run actions:smoke -- --label local
bun run agent:turn -- --label local-agent

To exercise the same workspace task the Action runs:

CODEX_WORKSPACE_MODE=actions CODEX_HOME="$PWD/.codex" bun run workspace:smoke
CODEX_WORKSPACE_MODE=actions bun run workspace:agent-turn

Jojo Setup

Use jojo.build as the canonical remote:

git remote add origin git@jojo.build:peezy-tech/auto-workspace.git
git push -u origin main

Then open the repository Actions page and run Manual flow smoke or Manual Codex agent turn manually.